From 47c5188789bc40671504ed1fa3a44765cefba44f Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 16 Feb 2010 14:50:09 +0000 Subject: Introduce isOpaqueTy and use it rather than isa. Also, move some methods to try to have the type predicates be more logically positioned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96349 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Target/CBackend') diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index c753555..f65b1aa 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -385,7 +385,7 @@ bool CBackendNameAllUsedStructsAndMergeFunctions::runOnModule(Module &M) { // If this isn't a struct or array type, remove it from our set of types // to name. This simplifies emission later. - if (!I->second->isStructTy() && !isa(I->second) && + if (!I->second->isStructTy() && !I->second->isOpaqueTy() && !I->second->isArrayTy()) { TST.remove(I); } else { @@ -597,7 +597,7 @@ raw_ostream &CWriter::printType(formatted_raw_ostream &Out, } // Check to see if the type is named. - if (!IgnoreName || isa(Ty)) { + if (!IgnoreName || Ty->isOpaqueTy()) { std::map::iterator I = TypeNames.find(Ty); if (I != TypeNames.end()) return Out << I->second << ' ' << NameSoFar; } @@ -700,7 +700,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty, } // Check to see if the type is named. - if (!IgnoreName || isa(Ty)) { + if (!IgnoreName || Ty->isOpaqueTy()) { std::map::iterator I = TypeNames.find(Ty); if (I != TypeNames.end()) return Out << I->second << ' ' << NameSoFar; } -- cgit v1.1