From e862cbc5f654641dc766f40e9970d6b2e12131bd Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sun, 4 Jul 2010 21:44:19 +0000 Subject: Don't try to install the __[u]int128_t identifier if it is already installed by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. llvm-svn: 107595 --- clang/lib/Sema/Sema.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/Sema/Sema.cpp') diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 3e23ad30300..6194c293d2b 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -46,7 +46,8 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { VAListTagName = PP.getIdentifierInfo("__va_list_tag"); - if (PP.getTargetInfo().getPointerWidth(0) >= 64) { + if (!Context.isInt128Installed() && // May be set by PCHReader. + PP.getTargetInfo().getPointerWidth(0) >= 64) { TypeSourceInfo *TInfo; // Install [u]int128_t for 64-bit targets. @@ -61,6 +62,7 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { SourceLocation(), &Context.Idents.get("__uint128_t"), TInfo), TUScope); + Context.setInt128Installed(); } -- cgit v1.2.3