[llvm] r284039 - [ThinLTO] Fix bot failure due to unused variable with NDEBUG
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 13:06:02 PDT 2016
Author: tejohnson
Date: Wed Oct 12 15:06:02 2016
New Revision: 284039
URL: http://llvm.org/viewvc/llvm-project?rev=284039&view=rev
Log:
[ThinLTO] Fix bot failure due to unused variable with NDEBUG
Put variable only used in assert under #ifndef NDEBUG.
This should fix bot failure at
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/28537
Modified:
llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp
Modified: llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp?rev=284039&r1=284038&r2=284039&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp (original)
+++ llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp Wed Oct 12 15:06:02 2016
@@ -176,7 +176,10 @@ int main(int argc, char **argv) {
}
}
for (auto I : CurrentFileSymResolutions) {
- auto NumErased = CommandLineResolutions.erase({F, I.first});
+#ifndef NDEBUG
+ auto NumErased =
+#endif
+ CommandLineResolutions.erase({F, I.first});
assert(NumErased > 0);
}
More information about the llvm-commits
mailing list