For PR411:
[oota-llvm.git] / lib / Transforms / Instrumentation / TraceBasicBlocks.cpp
index 68e0d282cc5a6fac7a4255b72d95eff7911fa171..4c09fb61c5888d1ac166251e02397eb7957bd078 100644 (file)
@@ -58,7 +58,7 @@ static void InsertInstrumentationCall (BasicBlock *BB,
 }
 
 bool TraceBasicBlocks::runOnModule(Module &M) {
-  Function *Main = M.getMainFunction();
+  Function *Main = M.getFunction("main");
   if (Main == 0) {
     cerr << "WARNING: cannot insert basic-block trace instrumentation"
          << " into a module with no main function!\n";