diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-24 21:46:40 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-24 21:46:40 +0000 |
commit | 971c4fae6092976338b755af1d47dac07c8f16e3 (patch) | |
tree | 79c99cc3a9071a8d1c7a1a20a22a73dc9ae71d08 /lib/AST/Type.cpp | |
parent | b394d1ca7d6debc1bce0f7797bb790df6bbf1d29 (diff) |
-Add support for cv-qualifiers after function declarators.
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 5de44762c3..87b91ae2ea 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -705,15 +705,18 @@ const char *BuiltinType::getName() const { void FunctionTypeProto::Profile(llvm::FoldingSetNodeID &ID, QualType Result, arg_type_iterator ArgTys, - unsigned NumArgs, bool isVariadic) { + unsigned NumArgs, bool isVariadic, + unsigned TypeQuals) { ID.AddPointer(Result.getAsOpaquePtr()); for (unsigned i = 0; i != NumArgs; ++i) ID.AddPointer(ArgTys[i].getAsOpaquePtr()); ID.AddInteger(isVariadic); + ID.AddInteger(TypeQuals); } void FunctionTypeProto::Profile(llvm::FoldingSetNodeID &ID) { - Profile(ID, getResultType(), arg_type_begin(), NumArgs, isVariadic()); + Profile(ID, getResultType(), arg_type_begin(), NumArgs, isVariadic(), + getTypeQuals()); } void ObjCQualifiedInterfaceType::Profile(llvm::FoldingSetNodeID &ID, |