summaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetABIInfo.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-17 17:50:17 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-17 17:50:17 +0000
commit35366a67baa970c287c714c957cf78a4131cf60d (patch)
tree053ba730a50f0c434f8e6d6ca89d03d9cdcfc14d /lib/CodeGen/TargetABIInfo.cpp
parent01bc160ffccc03e4c0583acf82bd7ab80494219a (diff)
downloadclang-35366a67baa970c287c714c957cf78a4131cf60d.tar.gz
clang-35366a67baa970c287c714c957cf78a4131cf60d.tar.bz2
clang-35366a67baa970c287c714c957cf78a4131cf60d.tar.xz
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetABIInfo.cpp')
-rw-r--r--lib/CodeGen/TargetABIInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/TargetABIInfo.cpp b/lib/CodeGen/TargetABIInfo.cpp
index 7063327d3a..c3f35453ba 100644
--- a/lib/CodeGen/TargetABIInfo.cpp
+++ b/lib/CodeGen/TargetABIInfo.cpp
@@ -68,7 +68,7 @@ static bool isEmptyField(ASTContext &Context, const FieldDecl *FD) {
/// fields. Note that a structure with a flexible array member is not
/// considered empty.
static bool isEmptyRecord(ASTContext &Context, QualType T) {
- const RecordType *RT = T->getAs<RecordType>();
+ const RecordType *RT = T->getAsRecordType();
if (!RT)
return 0;
const RecordDecl *RD = RT->getDecl();
@@ -168,7 +168,7 @@ static bool typeContainsSSEVector(const RecordDecl *RD, ASTContext &Context) {
Context.getTypeSize(FD->getType()) >= 128)
return true;
- if (const RecordType* RT = FD->getType()->getAs<RecordType>())
+ if (const RecordType* RT = FD->getType()->getAsRecordType())
if (typeContainsSSEVector(RT->getDecl(), Context))
return true;
}
@@ -272,7 +272,7 @@ bool X86_32ABIInfo::shouldReturnTypeInRegister(QualType Ty,
return shouldReturnTypeInRegister(AT->getElementType(), Context);
// Otherwise, it must be a record type.
- const RecordType *RT = Ty->getAs<RecordType>();
+ const RecordType *RT = Ty->getAsRecordType();
if (!RT) return false;
// Structure types are passed in register if all fields would be
@@ -385,7 +385,7 @@ unsigned X86_32ABIInfo::getIndirectArgumentAlignment(QualType Ty,
ASTContext &Context) {
unsigned Align = Context.getTypeAlign(Ty);
if (Align < 128) return 0;
- if (const RecordType* RT = Ty->getAs<RecordType>())
+ if (const RecordType* RT = Ty->getAsRecordType())
if (typeContainsSSEVector(RT->getDecl(), Context))
return 16;
return 0;
@@ -704,7 +704,7 @@ void X86_64ABIInfo::classify(QualType Ty,
if (Hi == Memory)
Lo = Memory;
assert((Hi != SSEUp || Lo == SSE) && "Invalid SSEUp array classification.");
- } else if (const RecordType *RT = Ty->getAs<RecordType>()) {
+ } else if (const RecordType *RT = Ty->getAsRecordType()) {
uint64_t Size = Context.getTypeSize(Ty);
// AMD64-ABI 3.2.3p2: Rule 1. If the size of an object is larger