diff options
| author | John McCall <rjmccall@apple.com> | 2010-12-10 11:01:00 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-12-10 11:01:00 +0000 |
| commit | 717d9b0e2f2a8b39d3ede0b54949e8e5c200ac12 (patch) | |
| tree | 46119dd1480aa529628d5ce3e03d7148cb4cd8c1 /clang/lib/AST/ASTContext.cpp | |
| parent | a7c04718805a1a0dc4bd95c2f1640d48ec463e7f (diff) | |
| download | bcm5719-llvm-717d9b0e2f2a8b39d3ede0b54949e8e5c200ac12.tar.gz bcm5719-llvm-717d9b0e2f2a8b39d3ede0b54949e8e5c200ac12.zip | |
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>.
llvm-svn: 121478
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 9e46e8765c5..dfdc505b1ad 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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) { |

