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 | 7f64823edbe11a0df2fc36efde8b013ca2051231 (patch) | |
tree | 9a3b03ce5effeaeeaab68a5d6fa408eb9469aa95 /lib/Object/ELFObjectFile.cpp | |
parent | 0307b9a88574d7e54459181afaa656ac92971847 (diff) |
Sink assert-only variables into the asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/ELFObjectFile.cpp')
-rw-r--r-- | lib/Object/ELFObjectFile.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/Object/ELFObjectFile.cpp b/lib/Object/ELFObjectFile.cpp index 3f38617587..873d7b9472 100644 --- a/lib/Object/ELFObjectFile.cpp +++ b/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; } |