diff options
author | Duncan Sands <baldrick@free.fr> | 2010-02-16 14:50:09 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-02-16 14:50:09 +0000 |
commit | 47c5188789bc40671504ed1fa3a44765cefba44f (patch) | |
tree | aa7ba3ba385313b3bab11086a15dbb6081cf05d2 /lib/Target/CBackend | |
parent | 1df9859c40492511b8aa4321eb76496005d3b75b (diff) | |
download | external_llvm-47c5188789bc40671504ed1fa3a44765cefba44f.zip external_llvm-47c5188789bc40671504ed1fa3a44765cefba44f.tar.gz external_llvm-47c5188789bc40671504ed1fa3a44765cefba44f.tar.bz2 |
Introduce isOpaqueTy and use it rather than isa<OpaqueType>. 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
Diffstat (limited to 'lib/Target/CBackend')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<OpaqueType>(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<OpaqueType>(Ty)) { + if (!IgnoreName || Ty->isOpaqueTy()) { std::map<const Type *, std::string>::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<OpaqueType>(Ty)) { + if (!IgnoreName || Ty->isOpaqueTy()) { std::map<const Type *, std::string>::iterator I = TypeNames.find(Ty); if (I != TypeNames.end()) return Out << I->second << ' ' << NameSoFar; } |