[llvm-commits] CVS: llvm/include/llvm/Module.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Nov 8 14:35:01 PST 2002
Changes in directory llvm/include/llvm:
Module.h updated: 1.27 -> 1.28
---
Log message:
Add a method "getMainFunction()" that efficiently locates 'main' in a module
---
Diffs of the changes:
Index: llvm/include/llvm/Module.h
diff -u llvm/include/llvm/Module.h:1.27 llvm/include/llvm/Module.h:1.28
--- llvm/include/llvm/Module.h:1.27 Sun Oct 13 22:30:13 2002
+++ llvm/include/llvm/Module.h Fri Nov 8 14:34:00 2002
@@ -80,6 +80,12 @@
///
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.
More information about the llvm-commits
mailing list