From ae4dfb99948c6b18fbef654a30f167c49fdedef3 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 10 Feb 2017 22:04:17 +0000 Subject: [PATCH] [InstCombine] Silence unused variable warning in Release builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294788 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 877c03b8083..dec998cca0b 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/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(I.getType()); auto *NT = cast(V->getType()); assert(PT != NT && PT->getElementType() == NT->getElementType() && "Invalid usage"); +#endif WorkMap[&I] = V; findLoadAndReplace(I); } -- 2.50.1