aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-04 21:44:19 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-04 21:44:19 +0000
commit006113841bdae1edb77aef75ba1ffdf2e55a3094 (patch)
tree58cbf9843a8b787b3067625bd20eea5f543b3f6f /lib/Sema/Sema.cpp
parent691d77f20763915fc7c9b34e29939d225fd0b4d2 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 3e23ad3030..6194c293d2 100644
--- a/lib/Sema/Sema.cpp
+++ b/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();
}