mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 06:04:47 +00:00
Add getOrInsertFunction and getFunction methods to Module. This simplifies
some code in the transformations. llvm-svn: 2026
This commit is contained in:
parent
0cc345f1d3
commit
33ff5dc7e7
@ -18,6 +18,7 @@
|
||||
class GlobalVariable;
|
||||
class GlobalValueRefMap; // Used by ConstantVals.cpp
|
||||
class ConstantPointerRef;
|
||||
class FunctionType;
|
||||
|
||||
class Module : public Value, public SymTabValue {
|
||||
public:
|
||||
@ -52,6 +53,16 @@ public:
|
||||
Module();
|
||||
~Module();
|
||||
|
||||
// getOrInsertFunction - Look up the specified function in the module symbol
|
||||
// table. If it does not exist, add a prototype for the function and return
|
||||
// it.
|
||||
Function *getOrInsertFunction(const std::string &Name, const FunctionType *T);
|
||||
|
||||
// getFunction - Look up the specified function in the module symbol table.
|
||||
// If it does not exist, return null.
|
||||
//
|
||||
Function *getFunction(const std::string &Name, const FunctionType *Ty);
|
||||
|
||||
// Get the underlying elements of the Module...
|
||||
inline const GlobalListType &getGlobalList() const { return GlobalList; }
|
||||
inline GlobalListType &getGlobalList() { return GlobalList; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user