diff options
Diffstat (limited to 'lib/Module')
-rw-r--r-- | lib/Module/KModule.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index d185f687..07ad2229 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -275,9 +275,13 @@ void KModule::manifest(InterpreterHandler *ih, bool forceSourceOutput) { infos = std::unique_ptr<InstructionInfoTable>( new InstructionInfoTable(module.get())); + std::vector<Function *> declarations; + for (auto &Function : *module) { - if (Function.isDeclaration()) + if (Function.isDeclaration()) { + declarations.push_back(&Function); continue; + } auto kf = std::unique_ptr<KFunction>(new KFunction(&Function, this)); @@ -297,6 +301,11 @@ void KModule::manifest(InterpreterHandler *ih, bool forceSourceOutput) { escapingFunctions.insert(kf->function); } + for (auto &declaration : declarations) { + if (functionEscapes(declaration)) + escapingFunctions.insert(declaration); + } + if (DebugPrintEscapingFunctions && !escapingFunctions.empty()) { llvm::errs() << "KLEE: escaping functions: ["; for (auto &Function : escapingFunctions) |