diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h b/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h index 838df13..367f57f 100644 --- a/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h +++ b/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_SERIALIZATION_LIB_AST_COMMON_H #include "clang/Serialization/ASTBitCodes.h" +#include "clang/AST/ASTContext.h" namespace clang { @@ -31,7 +32,7 @@ enum DeclUpdateKind { TypeIdx TypeIdxFromBuiltin(const BuiltinType *BT); template <typename IdxForTypeTy> -TypeID MakeTypeID(QualType T, IdxForTypeTy IdxForType) { +TypeID MakeTypeID(ASTContext &Context, QualType T, IdxForTypeTy IdxForType) { if (T.isNull()) return PREDEF_TYPE_NULL_ID; @@ -46,6 +47,11 @@ TypeID MakeTypeID(QualType T, IdxForTypeTy IdxForType) { if (const BuiltinType *BT = dyn_cast<BuiltinType>(T.getTypePtr())) return TypeIdxFromBuiltin(BT).asTypeID(FastQuals); + if (T == Context.AutoDeductTy) + return TypeIdx(PREDEF_TYPE_AUTO_DEDUCT).asTypeID(FastQuals); + if (T == Context.AutoRRefDeductTy) + return TypeIdx(PREDEF_TYPE_AUTO_RREF_DEDUCT).asTypeID(FastQuals); + return IdxForType(T).asTypeID(FastQuals); } |