diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-10-12 20:06:02 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-10-12 20:06:02 +0000 |
commit | e0ace4ad680442c5e2eb1f99d9477afbd59139cb (patch) | |
tree | ddf2c406e9db8a7b304066eb4469223fddd6fef9 /tools/llvm-lto2 | |
parent | fed07c121e7ae8a33bc2aa95a4e7627e44550c1f (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-lto2')
-rw-r--r-- | tools/llvm-lto2/llvm-lto2.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-lto2/llvm-lto2.cpp b/tools/llvm-lto2/llvm-lto2.cpp index 0813f4728e6..a3cc6ef14d1 100644 --- a/tools/llvm-lto2/llvm-lto2.cpp +++ b/tools/llvm-lto2/llvm-lto2.cpp @@ -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); } |