[llvm] r279582 - #ifdef out validation code when asserts are disabled to remove unused variable
Richard Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 15:14:16 PDT 2016
Author: rsmith
Date: Tue Aug 23 17:14:15 2016
New Revision: 279582
URL: http://llvm.org/viewvc/llvm-project?rev=279582&view=rev
Log:
#ifdef out validation code when asserts are disabled to remove unused variable
warnings.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp?rev=279582&r1=279581&r2=279582&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp Tue Aug 23 17:14:15 2016
@@ -264,6 +264,7 @@ MachineInstrBuilder MachineIRBuilder::bu
}
void MachineIRBuilder::validateTruncExt(ArrayRef<LLT> Tys, bool IsExtend) {
+#ifndef NDEBUG
assert(Tys.size() == 2 && "cast should have a source and a dest type");
LLT DstTy{Tys[0]}, SrcTy{Tys[1]};
@@ -280,4 +281,5 @@ void MachineIRBuilder::validateTruncExt(
else
assert(DstTy.getSizeInBits() < SrcTy.getSizeInBits() &&
"invalid widening trunc");
+#endif
}
More information about the llvm-commits
mailing list