mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-26 07:34:14 +00:00
Add getOrInsertFunction and getFunction methods to Module. This simplifies
some code in the transformations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b59404280b
commit
db70a8eff3
@ -18,6 +18,7 @@
|
|||||||
class GlobalVariable;
|
class GlobalVariable;
|
||||||
class GlobalValueRefMap; // Used by ConstantVals.cpp
|
class GlobalValueRefMap; // Used by ConstantVals.cpp
|
||||||
class ConstantPointerRef;
|
class ConstantPointerRef;
|
||||||
|
class FunctionType;
|
||||||
|
|
||||||
class Module : public Value, public SymTabValue {
|
class Module : public Value, public SymTabValue {
|
||||||
public:
|
public:
|
||||||
@ -52,6 +53,16 @@ public:
|
|||||||
Module();
|
Module();
|
||||||
~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...
|
// Get the underlying elements of the Module...
|
||||||
inline const GlobalListType &getGlobalList() const { return GlobalList; }
|
inline const GlobalListType &getGlobalList() const { return GlobalList; }
|
||||||
inline GlobalListType &getGlobalList() { return GlobalList; }
|
inline GlobalListType &getGlobalList() { return GlobalList; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user