summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorRoman Tereshin <rtereshin@apple.com>2018-04-13 21:23:11 +0000
committerRoman Tereshin <rtereshin@apple.com>2018-04-13 21:23:11 +0000
commitdab10b546873408533adac9b4a7f34bd9d1d2671 (patch)
tree8711f2e9c442cc6d161c109923f3d156606eff74 /llvm/tools/opt/opt.cpp
parentd769eb36ab2b8813f71958cd96183adc611c43eb (diff)
downloadbcm5719-llvm-dab10b546873408533adac9b4a7f34bd9d1d2671.tar.gz
bcm5719-llvm-dab10b546873408533adac9b4a7f34bd9d1d2671.zip
[DebugInfo][OPT] NFC follow-up on "Fixing a couple of DI duplication bugs of CloneModule"
llvm-svn: 330070
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r--llvm/tools/opt/opt.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index eda61e7c051..3de76e983ec 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -726,7 +726,7 @@ int main(int argc, char **argv) {
// a stream to write to them. Note that llc does something similar and it
// may be worth to abstract this out in the future.
SmallVector<char, 0> Buffer;
- SmallVector<char, 0> CompileTwiceBuffer;
+ SmallVector<char, 0> FirstRunBuffer;
std::unique_ptr<raw_svector_ostream> BOS;
raw_ostream *OS = nullptr;
@@ -765,20 +765,20 @@ int main(int argc, char **argv) {
// Run all passes on the original module first, so the second run processes
// the clone to catch CloneModule bugs.
Passes.run(*M);
- CompileTwiceBuffer = Buffer;
+ FirstRunBuffer = Buffer;
Buffer.clear();
Passes.run(*M2);
// Compare the two outputs and make sure they're the same
assert(Out);
- if (Buffer.size() != CompileTwiceBuffer.size() ||
- (memcmp(Buffer.data(), CompileTwiceBuffer.data(), Buffer.size()) !=
- 0)) {
- errs() << "Running the pass manager twice changed the output.\n"
- "Writing the result of the second run to the specified output.\n"
- "To generate the one-run comparison binary, just run without\n"
- "the compile-twice option\n";
+ if (Buffer.size() != FirstRunBuffer.size() ||
+ (memcmp(Buffer.data(), FirstRunBuffer.data(), Buffer.size()) != 0)) {
+ errs()
+ << "Running the pass manager twice changed the output.\n"
+ "Writing the result of the second run to the specified output.\n"
+ "To generate the one-run comparison binary, just run without\n"
+ "the compile-twice option\n";
Out->os() << BOS->str();
Out->keep();
if (OptRemarkFile)
OpenPOWER on IntegriCloud