diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-30 02:43:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-30 02:43:43 +0000 |
commit | 2df9ced9fd1e8c7d7b38443db07e0e811de22571 (patch) | |
tree | c5cb423c1cc8fe563f15be09e5a3e6612763b643 /lib/Sema/Sema.cpp | |
parent | 5532180ae3fa5b3bfa0b2177f08c94075641e8bb (diff) |
initial support for __[u]int128_t, which should be basically
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 367c9f5756..8ce3ce0be6 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -108,6 +108,18 @@ static inline RecordDecl *CreateStructDecl(ASTContext &C, const char *Name) { void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { TUScope = S; PushDeclContext(S, Context.getTranslationUnitDecl()); + + // Install [u]int128_t. + PushOnScopeChains(TypedefDecl::Create(Context, CurContext, + SourceLocation(), + &Context.Idents.get("__int128_t"), + Context.Int128Ty), TUScope); + PushOnScopeChains(TypedefDecl::Create(Context, CurContext, + SourceLocation(), + &Context.Idents.get("__uint128_t"), + Context.UnsignedInt128Ty), TUScope); + + if (!PP.getLangOptions().ObjC1) return; if (Context.getObjCSelType().isNull()) { |