diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2018-07-24 22:04:02 +0200 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2018-07-28 12:27:03 +0100 |
commit | b585a94ad0cb30570cf4f14e2dc1ebb43f694bb3 (patch) | |
tree | f0d0f441a86bd6685ed5add5c771ed38445b638b /lib/Module | |
parent | 09bf6d322d79381de780871f26cdffc26d7dacf4 (diff) | |
download | klee-b585a94ad0cb30570cf4f14e2dc1ebb43f694bb3.tar.gz |
add declarations to escapingFunctions
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) |