From: Pavel Chupin Date: Mon, 4 Aug 2014 12:39:43 +0000 (+0000) Subject: [x32] Add __int128 support X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4794fa681880163c492df7327a8f68081451776b;p=clang [x32] Add __int128 support Summary: Adding __int128 support explicitly for x86_64 because currently it's on only when pointer size >= 64 which is not the case for x32. Test Plan: One of the tests using __int128 is updated Reviewers: atanasyan, chandlerc Subscribers: cfe-commits, rob.khasanov, zinovy.nis, dschuff Differential Revision: http://reviews.llvm.org/D4755 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214710 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index e8d23a8b78..034bb07b05 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -3401,6 +3401,8 @@ public: return CC_C; } + // for x32 we need it here explicitly + bool hasInt128Type() const override { return true; } }; } // end anonymous namespace diff --git a/test/Sema/types.c b/test/Sema/types.c index 0450de1c8e..6a22b20b0e 100644 --- a/test/Sema/types.c +++ b/test/Sema/types.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9 // RUN: %clang_cc1 %s -pedantic -verify -triple=mips64-linux-gnu +// RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-unknown-linux +// RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-unknown-linux-gnux32 // rdar://6097662 typedef int (*T)[2];