summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-02-10 22:04:17 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-02-10 22:04:17 +0000
commit684c87be4f6a2cc962564c808e420187d65882d1 (patch)
tree7b1f67226eaffa3838a8d11d0997762d2886320c /llvm/lib/Transforms
parentee0b0ec935b4fe679cb5dd3f626b1e73673ce5a6 (diff)
downloadbcm5719-llvm-684c87be4f6a2cc962564c808e420187d65882d1.tar.gz
bcm5719-llvm-684c87be4f6a2cc962564c808e420187d65882d1.zip
[InstCombine] Silence unused variable warning in Release builds.
llvm-svn: 294788
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 877c03b8083..dec998cca0b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -314,10 +314,12 @@ void PointerReplacer::replace(Instruction *I) {
}
void PointerReplacer::replacePointer(Instruction &I, Value *V) {
+#ifndef NDEBUG
auto *PT = cast<PointerType>(I.getType());
auto *NT = cast<PointerType>(V->getType());
assert(PT != NT && PT->getElementType() == NT->getElementType() &&
"Invalid usage");
+#endif
WorkMap[&I] = V;
findLoadAndReplace(I);
}
OpenPOWER on IntegriCloud