]> granicus.if.org Git - llvm/commitdiff
[InstCombine] Silence unused variable warning in Release builds.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 10 Feb 2017 22:04:17 +0000 (22:04 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 10 Feb 2017 22:04:17 +0000 (22:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294788 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp

index 877c03b80837c87f0b0f4123d650f85320965889..dec998cca0bd2b48fe81d72041ea4ce9cfb83596 100644 (file)
@@ -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);
 }