Add a method "getMainFunction()" that efficiently locates 'main' in a module

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4629 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-11-08 20:34:02 +00:00
parent d321593330
commit a9a93f3777
2 changed files with 58 additions and 0 deletions
+6
View File
@@ -80,6 +80,12 @@ public:
///
Function *getFunction(const std::string &Name, const FunctionType *Ty);
/// 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();
/// addTypeName - Insert an entry in the symbol table mapping Str to Type. If
/// there is already an entry for this name, true is returned and the symbol
/// table is not modified.