diff options
author | Martin Nowack <martin.nowack@gmail.com> | 2018-05-08 11:30:58 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-05-09 10:46:15 +0100 |
commit | e0aff85c24c039606d82d209617a1334a9ed21e2 (patch) | |
tree | e0c98e641041d1de99a21f1fec4c05033a821e92 /lib | |
parent | 8affd4a2dfbb08d820387f8e28f95a3a7276b710 (diff) | |
download | klee-e0aff85c24c039606d82d209617a1334a9ed21e2.tar.gz |
Remove the option for truncating lines in assembly.ll
The behaviour couldn't be triggered for a kcachegrind from 2012.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Module/KModule.cpp | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 0f0d8fed..75e71c0a 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -54,10 +54,6 @@ namespace { eSwitchTypeLLVM, eSwitchTypeInternal }; - - cl::opt<bool> - NoTruncateSourceLines("no-truncate-source-lines", - cl::desc("Don't truncate long lines in the output source")); cl::opt<bool> OutputSource("output-source", @@ -273,42 +269,10 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts, klee_error("Unexpected instruction operand types detected"); } - // Write out the .ll assembly file. We truncate long lines to work - // around a kcachegrind parsing bug (it puts them on new lines), so - // that source browsing works. if (OutputSource) { - llvm::raw_fd_ostream *os = ih->openOutputFile("assembly.ll"); + std::unique_ptr<llvm::raw_fd_ostream> os(ih->openOutputFile("assembly.ll")); assert(os && !os->has_error() && "unable to open source output"); - - // We have an option for this in case the user wants a .ll they - // can compile. - if (NoTruncateSourceLines) { - *os << *module; - } else { - std::string string; - llvm::raw_string_ostream rss(string); - rss << *module; - rss.flush(); - const char *position = string.c_str(); - - for (;;) { - const char *end = index(position, '\n'); - if (!end) { - *os << position; - break; - } else { - unsigned count = (end - position) + 1; - if (count<255) { - os->write(position, count); - } else { - os->write(position, 254); - *os << "\n"; - } - position = end+1; - } - } - } - delete os; + *os << *module; } if (OutputModule) { |