Sink assert-only variables into the asserts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Beaumont-Gay 2012-01-24 19:43:30 +00:00
parent 0307b9a885
commit 7f64823edb

View File

@ -1672,14 +1672,11 @@ namespace llvm {
new DyldELFObject<support::little, true>(Object, MemoryMap, ec);
// Unit testing for type inquiry
bool isBinary = isa<Binary>(result);
bool isDyld = isa<DyldELFObject<support::little, true> >(result);
bool isFile = isa<ELFObjectFile<support::little, true> >(result);
(void)isBinary;
(void)isDyld;
(void)isFile;
assert(isBinary && isDyld && isFile &&
"Type inquiry failed for ELF object!");
assert(isa<Binary>(result) && "Type inquiry failed for ELF object!");
assert((isa<DyldELFObject<support::little, true> >(result)) &&
"Type inquiry failed for ELF object!");
assert((isa<ELFObjectFile<support::little, true> >(result)) &&
"Type inquiry failed for ELF object!");
return result;
}
}
@ -1695,14 +1692,11 @@ namespace llvm {
new ELFObjectFile<support::little, true>(Object, ec);
// Unit testing for type inquiry
bool isBinary = isa<Binary>(result);
bool isDyld = isa<DyldELFObject<support::little, true> >(result);
bool isFile = isa<ELFObjectFile<support::little, true> >(result);
(void)isBinary;
(void)isDyld;
(void)isFile;
assert(isBinary && isFile && !isDyld &&
"Type inquiry failed for ELF object!");
assert(isa<Binary>(result) && "Type inquiry failed for ELF object!");
assert((!isa<DyldELFObject<support::little, true> >(result)) &&
"Type inquiry failed for ELF object!");
assert((isa<ELFObjectFile<support::little, true> >(result)) &&
"Type inquiry failed for ELF object!");
return result;
}