summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-30 02:43:43 +0000
committerChris Lattner <sabre@nondot.org>2009-04-30 02:43:43 +0000
commitf122cef4df04d017c1e43b9c6444c4e8e1a5b3ed (patch)
treeb0662fcfbbec40cd88ee5ed2c1e5914663a68c97 /clang/lib/Sema/Sema.cpp
parent7216b9da5f20226dd11bdf109bd9fb84463852ee (diff)
downloadbcm5719-llvm-f122cef4df04d017c1e43b9c6444c4e8e1a5b3ed.tar.gz
bcm5719-llvm-f122cef4df04d017c1e43b9c6444c4e8e1a5b3ed.zip
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. llvm-svn: 70464
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 367c9f5756b..8ce3ce0be63 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/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()) {
OpenPOWER on IntegriCloud