diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-07 20:49:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-07 20:49:59 +0000 |
commit | 2fbfdcffd3e0cf41422aaa6c526c37cb02b81341 (patch) | |
tree | c1991eac5d23807b38e5909f861609b243562f70 /lib/Analysis/IPA | |
parent | dcc6d4cada290857ee74164816ec3c502c1db7a4 (diff) | |
download | external_llvm-2fbfdcffd3e0cf41422aaa6c526c37cb02b81341.zip external_llvm-2fbfdcffd3e0cf41422aaa6c526c37cb02b81341.tar.gz external_llvm-2fbfdcffd3e0cf41422aaa6c526c37cb02b81341.tar.bz2 |
Change references to the Method class to be references to the Function
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r-- | lib/Analysis/IPA/FindUnsafePointerTypes.cpp | 10 | ||||
-rw-r--r-- | lib/Analysis/IPA/FindUsedTypes.cpp | 12 |
2 files changed, 9 insertions, 13 deletions
diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp index 0179cbb..d689d93 100644 --- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp +++ b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp @@ -1,4 +1,4 @@ -//===- SafePointerAccess.cpp - Check pointer usage safety -------------------=// +//===- FindUnsafePointerTypes.cpp - Check pointer usage safety --------------=// // // This file defines a pass that can be used to determine, interprocedurally, // which pointer types are accessed unsafely in a program. If there is an @@ -20,7 +20,7 @@ #include "llvm/Assembly/CachedWriter.h" #include "llvm/Type.h" #include "llvm/Instruction.h" -#include "llvm/Method.h" +#include "llvm/Function.h" #include "llvm/Module.h" #include "llvm/Support/InstIterator.h" #include "Support/CommandLine.h" @@ -51,14 +51,10 @@ static inline bool isSafeInstruction(const Instruction *I) { } -// runOnMethod - Inspect the operations that the specified method does on -// values of various types. If they are deemed to be 'unsafe' note that the -// type is not safe to transform. -// bool FindUnsafePointerTypes::run(Module *Mod) { for (Module::iterator MI = Mod->begin(), ME = Mod->end(); MI != ME; ++MI) { - const Method *M = *MI; // We don't need/want write access + const Function *M = *MI; // We don't need/want write access for (const_inst_iterator I = inst_begin(M), E = inst_end(M); I != E; ++I) { const Instruction *Inst = *I; const Type *ITy = Inst->getType(); diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp index e67fe32..5c961d2 100644 --- a/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/lib/Analysis/IPA/FindUsedTypes.cpp @@ -1,4 +1,4 @@ -//===- FindUsedTypes.h - Find all Types used by a module --------------------=// +//===- FindUsedTypes.cpp - Find all Types used by a module ------------------=// // // This pass is used to seek out all of the types in use by the program. // @@ -10,7 +10,7 @@ #include "llvm/GlobalVariable.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" -#include "llvm/Method.h" +#include "llvm/Function.h" #include "llvm/Instruction.h" #include "llvm/Support/InstIterator.h" @@ -41,7 +41,7 @@ void FindUsedTypes::IncorporateSymbolTable(const SymbolTable *ST) { assert(0 && "Unimp"); } -// doPerMethodWork - This incorporates all types used by the specified method +// run - This incorporates all types used by the specified module // bool FindUsedTypes::run(Module *m) { UsedTypes.clear(); // reset if run multiple times... @@ -54,12 +54,12 @@ bool FindUsedTypes::run(Module *m) { IncorporateType((*I)->getType()); for (Module::iterator MI = m->begin(), ME = m->end(); MI != ME; ++MI) { - const Method *M = *MI; + const Function *M = *MI; if (IncludeSymbolTables && M->hasSymbolTable()) IncorporateSymbolTable(M->getSymbolTable()); // Add symtab first... - // Loop over all of the instructions in the method, adding their return type - // as well as the types of their operands. + // Loop over all of the instructions in the function, adding their return + // type as well as the types of their operands. // for (const_inst_iterator II = inst_begin(M), IE = inst_end(M); II != IE; ++II) { |