diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2012-01-24 19:43:30 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2012-01-24 19:43:30 +0000 |
commit | 88297ef6656f304a61fae58b518a5d94faf0aae2 (patch) | |
tree | 3f1544728fa187973fa0dbae365ac1173c6334f1 /llvm/lib/Object/ELFObjectFile.cpp | |
parent | d0a27f717e70ad95886d094af8d505b8d657ef48 (diff) | |
download | llvm-88297ef6656f304a61fae58b518a5d94faf0aae2.zip llvm-88297ef6656f304a61fae58b518a5d94faf0aae2.tar.gz llvm-88297ef6656f304a61fae58b518a5d94faf0aae2.tar.bz2 |
Sink assert-only variables into the asserts
llvm-svn: 148849
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ELFObjectFile.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index 3f38617..873d7b9 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -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; } |