From 7f64823edbe11a0df2fc36efde8b013ca2051231 Mon Sep 17 00:00:00 2001 From: Matt Beaumont-Gay Date: Tue, 24 Jan 2012 19:43:30 +0000 Subject: Sink assert-only variables into the asserts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148849 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/ELFObjectFile.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'lib/Object/ELFObjectFile.cpp') 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(Object, MemoryMap, ec); // Unit testing for type inquiry - bool isBinary = isa(result); - bool isDyld = isa >(result); - bool isFile = isa >(result); - (void)isBinary; - (void)isDyld; - (void)isFile; - assert(isBinary && isDyld && isFile && - "Type inquiry failed for ELF object!"); + assert(isa(result) && "Type inquiry failed for ELF object!"); + assert((isa >(result)) && + "Type inquiry failed for ELF object!"); + assert((isa >(result)) && + "Type inquiry failed for ELF object!"); return result; } } @@ -1695,14 +1692,11 @@ namespace llvm { new ELFObjectFile(Object, ec); // Unit testing for type inquiry - bool isBinary = isa(result); - bool isDyld = isa >(result); - bool isFile = isa >(result); - (void)isBinary; - (void)isDyld; - (void)isFile; - assert(isBinary && isFile && !isDyld && - "Type inquiry failed for ELF object!"); + assert(isa(result) && "Type inquiry failed for ELF object!"); + assert((!isa >(result)) && + "Type inquiry failed for ELF object!"); + assert((isa >(result)) && + "Type inquiry failed for ELF object!"); return result; } -- cgit v1.2.3