diff options
-rw-r--r-- | lib/Module/KModule.cpp | 7 | ||||
-rw-r--r-- | test/Feature/EscapingFunctions.c | 2 | ||||
-rw-r--r-- | test/Feature/EscapingFunctionsAlias.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 07ad2229..cbcd395c 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -308,8 +308,11 @@ void KModule::manifest(InterpreterHandler *ih, bool forceSourceOutput) { if (DebugPrintEscapingFunctions && !escapingFunctions.empty()) { llvm::errs() << "KLEE: escaping functions: ["; - for (auto &Function : escapingFunctions) - llvm::errs() << Function->getName() << ", "; + std::string delimiter = ""; + for (auto &Function : escapingFunctions) { + llvm::errs() << delimiter << Function->getName(); + delimiter = ", "; + } llvm::errs() << "]\n"; } } diff --git a/test/Feature/EscapingFunctions.c b/test/Feature/EscapingFunctions.c index bb9b8a4a..83d8415a 100644 --- a/test/Feature/EscapingFunctions.c +++ b/test/Feature/EscapingFunctions.c @@ -55,6 +55,6 @@ int main(int argc, char *argv[]) { uint64_t (*f4)(void) =(uint64_t (*)(void))bitcasted_function_declaration; f4(); - // CHECK: KLEE: escaping functions: {{\[((functionpointer|functionpointer_as_argument|bitcasted_functionpointer|function_declaration|bitcasted_function_declaration), ){5}\]}} + // CHECK: KLEE: escaping functions: {{\[((functionpointer|functionpointer_as_argument|bitcasted_functionpointer|function_declaration|bitcasted_function_declaration)(, )?){5}\]}} return 0; } diff --git a/test/Feature/EscapingFunctionsAlias.c b/test/Feature/EscapingFunctionsAlias.c index 933a23ca..ca8f2f4f 100644 --- a/test/Feature/EscapingFunctionsAlias.c +++ b/test/Feature/EscapingFunctionsAlias.c @@ -44,6 +44,6 @@ int main(int argc, char *argv[]) { // cast when aliasing should not result in either function being marked as escaping bitcast_in_global_alias(); - // CHECK: KLEE: escaping functions: {{\[((bitcast_of_global_alias|bitcast_of_global_aliasee), ){2}\]}} + // CHECK: KLEE: escaping functions: {{\[((bitcast_of_global_alias|bitcast_of_global_aliasee)(, )?){2}\]}} return 0; } |