[llvm-commits] CVS: llvm/tools/lli/lli.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Dec 1 14:48:35 PST 2005



Changes in directory llvm/tools/lli:

lli.cpp updated: 1.50 -> 1.51
---
Log message:

If a module has a main, but it is defined externally, refuse to run it.

Attempting to run it will find lli's main, which isn't the desired effect.


---
Diffs of the changes:  (+1 -1)

 lli.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.50 llvm/tools/lli/lli.cpp:1.51
--- llvm/tools/lli/lli.cpp:1.50	Sat Oct 22 23:37:20 2005
+++ llvm/tools/lli/lli.cpp	Thu Dec  1 16:48:23 2005
@@ -85,7 +85,7 @@
     // EnvVars to determine envp.
     //
     Function *Fn = MP->getModule()->getMainFunction();
-    if (!Fn) {
+    if (!Fn || Fn->isExternal()) {
       std::cerr << "'main' function not found in module.\n";
       return -1;
     }






More information about the llvm-commits mailing list