[llvm-commits] [llvm] r43209 - /llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp

Chris Lattner sabre at nondot.org
Sun Oct 21 19:39:47 PDT 2007


Author: lattner
Date: Sun Oct 21 21:39:47 2007
New Revision: 43209

URL: http://llvm.org/viewvc/llvm-project?rev=43209&view=rev
Log:
llvm-gcc3 is dead, along with it __main.

Modified:
    llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp?rev=43209&r1=43208&r2=43209&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp Sun Oct 21 21:39:47 2007
@@ -62,14 +62,6 @@
 };
 #endif // __linux__
 
-// __mainFunc - If the program does not have a linked in __main function, allow
-// it to run, but print a warning.
-static void __mainFunc() {
-  fprintf(stderr, "WARNING: Program called __main but was not linked to "
-          "libcrtend.a.\nThis probably won't hurt anything unless the "
-          "program is written in C++.\n");
-}
-
 // jit_exit - Used to intercept the "exit" library call.
 static void jit_exit(int Status) {
   runAtExitHandlers();   // Run atexit handlers...
@@ -95,10 +87,6 @@
   if (Name == "exit") return (void*)(intptr_t)&jit_exit;
   if (Name == "atexit") return (void*)(intptr_t)&jit_atexit;
 
-  // If the program does not have a linked in __main function, allow it to run,
-  // but print a warning.
-  if (Name == "__main") return (void*)(intptr_t)&__mainFunc;
-
   const char *NameStr = Name.c_str();
   // If this is an asm specifier, skip the sentinal.
   if (NameStr[0] == 1) ++NameStr;





More information about the llvm-commits mailing list