[llvm] r266529 - ValueMapper: Fix unused var warning. NFC

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 16 04:49:43 PDT 2016


Author: atanasyan
Date: Sat Apr 16 06:49:40 2016
New Revision: 266529

URL: http://llvm.org/viewvc/llvm-project?rev=266529&view=rev
Log:
ValueMapper: Fix unused var warning. NFC

Modified:
    llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp

Modified: llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp?rev=266529&r1=266528&r2=266529&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/ValueMapper.cpp Sat Apr 16 06:49:40 2016
@@ -505,6 +505,7 @@ bool MDNodeMapper::mapOperand(const Meta
     return false;
 
   if (Optional<Metadata *> MappedOp = M.mapSimpleMetadata(Op)) {
+#ifndef NDEBUG
     if (auto *CMD = dyn_cast<ConstantAsMetadata>(Op))
       assert((!*MappedOp || M.getVM().count(CMD->getValue()) ||
               M.getVM().getMappedMD(Op)) &&
@@ -512,6 +513,7 @@ bool MDNodeMapper::mapOperand(const Meta
     else
       assert((isa<MDString>(Op) || M.getVM().getMappedMD(Op)) &&
              "Expected result to be memoized");
+#endif
     return *MappedOp != Op;
   }
 




More information about the llvm-commits mailing list