Skip to content

Commit

Permalink
Fix createLibcWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Lana243 authored and ladisgin committed Apr 24, 2023
1 parent 83fc814 commit 789d797
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Runner/run_klee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,10 +1087,11 @@ createLibCWrapper(std::vector<std::unique_ptr<llvm::Module>> &userModules,
auto &ctx = userModules[0]->getContext();
Function *userMainFn = nullptr;
for (auto &module : userModules) {
userMainFn = module->getFunction(intendedFunction);
if (userMainFn) {
Function *func = module->getFunction(intendedFunction);
if (func) {
// Rename entry point using a prefix
userMainFn->setName("__user_" + intendedFunction);
func->setName("__user_" + intendedFunction);
userMainFn = func;
}
}

Expand Down

0 comments on commit 789d797

Please sign in to comment.