mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
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:
parent
0307b9a885
commit
7f64823edb
@ -1672,14 +1672,11 @@ namespace llvm {
|
|||||||
new DyldELFObject<support::little, true>(Object, MemoryMap, ec);
|
new DyldELFObject<support::little, true>(Object, MemoryMap, ec);
|
||||||
|
|
||||||
// Unit testing for type inquiry
|
// Unit testing for type inquiry
|
||||||
bool isBinary = isa<Binary>(result);
|
assert(isa<Binary>(result) && "Type inquiry failed for ELF object!");
|
||||||
bool isDyld = isa<DyldELFObject<support::little, true> >(result);
|
assert((isa<DyldELFObject<support::little, true> >(result)) &&
|
||||||
bool isFile = isa<ELFObjectFile<support::little, true> >(result);
|
"Type inquiry failed for ELF object!");
|
||||||
(void)isBinary;
|
assert((isa<ELFObjectFile<support::little, true> >(result)) &&
|
||||||
(void)isDyld;
|
"Type inquiry failed for ELF object!");
|
||||||
(void)isFile;
|
|
||||||
assert(isBinary && isDyld && isFile &&
|
|
||||||
"Type inquiry failed for ELF object!");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1695,14 +1692,11 @@ namespace llvm {
|
|||||||
new ELFObjectFile<support::little, true>(Object, ec);
|
new ELFObjectFile<support::little, true>(Object, ec);
|
||||||
|
|
||||||
// Unit testing for type inquiry
|
// Unit testing for type inquiry
|
||||||
bool isBinary = isa<Binary>(result);
|
assert(isa<Binary>(result) && "Type inquiry failed for ELF object!");
|
||||||
bool isDyld = isa<DyldELFObject<support::little, true> >(result);
|
assert((!isa<DyldELFObject<support::little, true> >(result)) &&
|
||||||
bool isFile = isa<ELFObjectFile<support::little, true> >(result);
|
"Type inquiry failed for ELF object!");
|
||||||
(void)isBinary;
|
assert((isa<ELFObjectFile<support::little, true> >(result)) &&
|
||||||
(void)isDyld;
|
"Type inquiry failed for ELF object!");
|
||||||
(void)isFile;
|
|
||||||
assert(isBinary && isFile && !isDyld &&
|
|
||||||
"Type inquiry failed for ELF object!");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user