aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Module.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-05 21:17:06 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-05 21:17:06 +0000
commit60ea274c706b6be9fb587d5f7c69405bef468b8c (patch)
treee25a1575dc1f638e401e76d13af7f85e19452c07 /include/llvm/Module.h
parent94b836a0dc68863442db8eeef5ac7c7e87c0e699 (diff)
For PR411:
Clean up the Module::getFunction interface. getMainFunction and getNamedFunction are now gone. Just use getFunction instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r--include/llvm/Module.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index 6992563abd..32b9ea6762 100644
--- a/include/llvm/Module.h
+++ b/include/llvm/Module.h
@@ -169,8 +169,11 @@ public:
/// 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. This version of the method takes a null terminated list of function
- /// arguments, which makes it easier for clients to use.
+ /// it. This function guarantees to return a constant of pointer to the
+ /// specified function type or a ConstantExpr BitCast of that type if the
+ /// named /// function has a different type. This version of the method
+ /// takes a null terminated list of function arguments, which makes it
+ /// easier for clients to use.
Constant *getOrInsertFunction(const std::string &Name, const Type *RetTy,...)
END_WITH_NULL;
@@ -178,18 +181,6 @@ public:
/// If it does not exist, return null.
Function *getFunction(const std::string &Name) const;
- /// getMainFunction - This function looks up main efficiently. This is such a
- /// common case, that it is a method in Module. If main cannot be found, a
- /// null pointer is returned.
- Function *getMainFunction() { return getFunction("main"); }
-
- /// getNamedFunction - Return the first function in the module with the
- /// specified name, of arbitrary type. This method returns null if a function
- /// with the specified name is not found.
- Function *getNamedFunction(const std::string &Name) const {
- return getFunction(Name);
- }
-
/// @}
/// @name Global Variable Accessors
/// @{