summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-08-23 22:14:15 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-08-23 22:14:15 +0000
commit418237bed8e7372930f0a2491af2ba8c68f032be (patch)
treeb2762bd604ef541ccacf230832f45958afe06bc2 /llvm/lib
parenteae6138936478d345e3ef14fcba85429042821ee (diff)
downloadbcm5719-llvm-418237bed8e7372930f0a2491af2ba8c68f032be.tar.gz
bcm5719-llvm-418237bed8e7372930f0a2491af2ba8c68f032be.zip
#ifdef out validation code when asserts are disabled to remove unused variable
warnings. llvm-svn: 279582
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
index c9499ca7e6f..2cb7e6696e5 100644
--- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -264,6 +264,7 @@ MachineInstrBuilder MachineIRBuilder::buildSelect(LLT Ty, unsigned Res,
}
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(ArrayRef<LLT> Tys, bool IsExtend) {
else
assert(DstTy.getSizeInBits() < SrcTy.getSizeInBits() &&
"invalid widening trunc");
+#endif
}
OpenPOWER on IntegriCloud