summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-02-16 14:50:09 +0000
committerDuncan Sands <baldrick@free.fr>2010-02-16 14:50:09 +0000
commitcbd43f89acea19925401398cf10d2c8e0f9b8b1f (patch)
tree45c1e733df6d9123217f9d8135ce168687a058d8 /llvm/lib/Target/CBackend
parent19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f (diff)
downloadbcm5719-llvm-cbd43f89acea19925401398cf10d2c8e0f9b8b1f.tar.gz
bcm5719-llvm-cbd43f89acea19925401398cf10d2c8e0f9b8b1f.zip
Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
methods to try to have the type predicates be more logically positioned. llvm-svn: 96349
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r--llvm/lib/Target/CBackend/CBackend.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp
index c753555c727..f65b1aa2513 100644
--- a/llvm/lib/Target/CBackend/CBackend.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud