[llvm-commits] CVS: llvm/tools/bugpoint/CrashDebugger.cpp Miscompilation.cpp
Reid Spencer
reid at x10sys.com
Mon Feb 5 13:19:54 PST 2007
Changes in directory llvm/tools/bugpoint:
CrashDebugger.cpp updated: 1.56 -> 1.57
Miscompilation.cpp updated: 1.86 -> 1.87
---
Log message:
For PR411: http://llvm.org/PR411 :
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)
---
Diffs of the changes: (+3 -3)
CrashDebugger.cpp | 2 +-
Miscompilation.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/tools/bugpoint/CrashDebugger.cpp
diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.56 llvm/tools/bugpoint/CrashDebugger.cpp:1.57
--- llvm/tools/bugpoint/CrashDebugger.cpp:1.56 Mon Feb 5 14:47:21 2007
+++ llvm/tools/bugpoint/CrashDebugger.cpp Mon Feb 5 15:19:13 2007
@@ -194,7 +194,7 @@
//if main isn't present, claim there is no problem
if (KeepMain && find(Funcs.begin(), Funcs.end(),
- BD.getProgram()->getMainFunction()) == Funcs.end())
+ BD.getProgram()->getFunction("main")) == Funcs.end())
return false;
// Clone the program to try hacking it apart...
Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.86 llvm/tools/bugpoint/Miscompilation.cpp:1.87
--- llvm/tools/bugpoint/Miscompilation.cpp:1.86 Mon Feb 5 14:47:21 2007
+++ llvm/tools/bugpoint/Miscompilation.cpp Mon Feb 5 15:19:13 2007
@@ -639,7 +639,7 @@
// First, if the main function is in the Safe module, we must add a stub to
// the Test module to call into it. Thus, we create a new function `main'
// which just calls the old one.
- if (Function *oldMain = Safe->getNamedFunction("main"))
+ if (Function *oldMain = Safe->getFunction("main"))
if (!oldMain->isDeclaration()) {
// Rename it
oldMain->setName("llvm_bugpoint_old_main");
@@ -685,7 +685,7 @@
for (Module::iterator F = Safe->begin(), E = Safe->end(); F != E; ++F) {
if (F->isDeclaration() && !F->use_empty() && &*F != resolverFunc &&
F->getIntrinsicID() == 0 /* ignore intrinsics */) {
- Function *TestFn = Test->getNamedFunction(F->getName());
+ Function *TestFn = Test->getFunction(F->getName());
// Don't forward functions which are external in the test module too.
if (TestFn && !TestFn->isDeclaration()) {
More information about the llvm-commits
mailing list