[llvm] r294788 - [InstCombine] Silence unused variable warning in Release builds.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 14:04:17 PST 2017
Author: d0k
Date: Fri Feb 10 16:04:17 2017
New Revision: 294788
URL: http://llvm.org/viewvc/llvm-project?rev=294788&view=rev
Log:
[InstCombine] Silence unused variable warning in Release builds.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp?rev=294788&r1=294787&r2=294788&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp Fri Feb 10 16:04:17 2017
@@ -314,10 +314,12 @@ void PointerReplacer::replace(Instructio
}
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);
}
More information about the llvm-commits
mailing list