summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorMeador Inge <meadori@codesourcery.com>2012-06-16 03:34:49 +0000
committerMeador Inge <meadori@codesourcery.com>2012-06-16 03:34:49 +0000
commit5d3fb22baceef03641b8e051cdbd497ee293bbaf (patch)
tree29440807b28521bc43e1c8cec82eecc7674c6dcb /clang/lib/Serialization
parent93ee5ca805f9d51c13dc613a07048ea83728fd97 (diff)
downloadbcm5719-llvm-5d3fb22baceef03641b8e051cdbd497ee293bbaf.tar.gz
bcm5719-llvm-5d3fb22baceef03641b8e051cdbd497ee293bbaf.zip
Explicitly build __builtin_va_list.
The target specific __builtin_va_list types are now explicitly built instead of injecting strings into the preprocessor input. llvm-svn: 158592
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp8
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp5
2 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index b762d1c65f0..eb74566011f 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -2851,11 +2851,6 @@ void ASTReader::InitializeContext() {
// Load the special types.
if (SpecialTypes.size() >= NumSpecialTypeIDs) {
- if (Context.getBuiltinVaListType().isNull()) {
- Context.setBuiltinVaListType(
- GetType(SpecialTypes[SPECIAL_TYPE_BUILTIN_VA_LIST]));
- }
-
if (unsigned String = SpecialTypes[SPECIAL_TYPE_CF_CONSTANT_STRING]) {
if (!Context.CFConstantStringTypeDecl)
Context.setCFConstantStringType(GetType(String));
@@ -4646,6 +4641,9 @@ Decl *ASTReader::GetDecl(DeclID ID) {
case PREDEF_DECL_OBJC_INSTANCETYPE_ID:
return Context.getObjCInstanceTypeDecl();
+
+ case PREDEF_DECL_BUILTIN_VA_LIST_ID:
+ return Context.getBuiltinVaListDecl();
}
}
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index efe1abc5c04..de5816df9e3 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -3212,7 +3212,9 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
DeclIDs[Context.UInt128Decl] = PREDEF_DECL_UNSIGNED_INT_128_ID;
if (Context.ObjCInstanceTypeDecl)
DeclIDs[Context.ObjCInstanceTypeDecl] = PREDEF_DECL_OBJC_INSTANCETYPE_ID;
-
+ if (Context.BuiltinVaListDecl)
+ DeclIDs[Context.getBuiltinVaListDecl()] = PREDEF_DECL_BUILTIN_VA_LIST_ID;
+
if (!Chain) {
// Make sure that we emit IdentifierInfos (and any attached
// declarations) for builtins. We don't need to do this when we're
@@ -3384,7 +3386,6 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
// Form the record of special types.
RecordData SpecialTypes;
- AddTypeRef(Context.getBuiltinVaListType(), SpecialTypes);
AddTypeRef(Context.getRawCFConstantStringType(), SpecialTypes);
AddTypeRef(Context.getFILEType(), SpecialTypes);
AddTypeRef(Context.getjmp_bufType(), SpecialTypes);
OpenPOWER on IntegriCloud