summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/Miscompilation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/bugpoint/Miscompilation.cpp')
-rw-r--r--llvm/tools/bugpoint/Miscompilation.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp
index c67d38fb5a6..2ac4fe774f4 100644
--- a/llvm/tools/bugpoint/Miscompilation.cpp
+++ b/llvm/tools/bugpoint/Miscompilation.cpp
@@ -826,14 +826,13 @@ CleanupAndPrepareModules(BugDriver &BD, std::unique_ptr<Module> Test,
// Add the resolver to the Safe module.
// Prototype: void *getPointerToNamedFunction(const char* Name)
- FunctionCallee resolverFunc = Safe->getOrInsertFunction(
+ Constant *resolverFunc = Safe->getOrInsertFunction(
"getPointerToNamedFunction", Type::getInt8PtrTy(Safe->getContext()),
Type::getInt8PtrTy(Safe->getContext()));
// Use the function we just added to get addresses of functions we need.
for (Module::iterator F = Safe->begin(), E = Safe->end(); F != E; ++F) {
- if (F->isDeclaration() && !F->use_empty() &&
- &*F != resolverFunc.getCallee() &&
+ if (F->isDeclaration() && !F->use_empty() && &*F != resolverFunc &&
!F->isIntrinsic() /* ignore intrinsics */) {
Function *TestFn = Test->getFunction(F->getName());
OpenPOWER on IntegriCloud