aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-10 11:01:00 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-10 11:01:00 +0000
commit49f4e1cbd839da27ff4814b4ea6d85a79f786cbd (patch)
tree9ab7a1af57b1fc26ad1d0b8913ac7da554101ff3 /lib/AST/ASTContext.cpp
parent55270e4bde91bd30d16086ae71f0f65caf3b8a51 (diff)
It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better. Remove this reference. To make that work, change some APIs (most importantly, getDesugaredType()) to take an ASTContext& if they need to return a QualType. Simultaneously, diminish the need to return a QualType by introducing some useful APIs on SplitQualType, which is just a std::pair<const Type *, Qualifiers>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 9e46e8765c..dfdc505b1a 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1084,7 +1084,7 @@ QualType ASTContext::getExtQualType(const Type *TypeNode, Qualifiers Quals) {
return T;
}
- ExtQuals *New = new (*this, TypeAlignment) ExtQuals(*this, TypeNode, Quals);
+ ExtQuals *New = new (*this, TypeAlignment) ExtQuals(TypeNode, Quals);
ExtQualNodes.InsertNode(New, InsertPos);
QualType T = QualType(New, Fast);
return T;
@@ -2791,7 +2791,7 @@ const ArrayType *ASTContext::getAsArrayType(QualType T) {
// we must propagate them down into the element type.
QualifierCollector Qs;
- const Type *Ty = Qs.strip(T.getDesugaredType());
+ const Type *Ty = Qs.strip(T.getDesugaredType(*this));
// If we have a simple case, just return now.
const ArrayType *ATy = dyn_cast<ArrayType>(Ty);
@@ -2854,7 +2854,7 @@ QualType ASTContext::getBaseElementType(QualType QT) {
QualifierCollector Qs;
while (const ArrayType *AT = getAsArrayType(QualType(Qs.strip(QT), 0)))
QT = AT->getElementType();
- return Qs.apply(QT);
+ return Qs.apply(*this, QT);
}
QualType ASTContext::getBaseElementType(const ArrayType *AT) {