Hi atanasyan, chandlerc,

Adding __int128 support explicitly for x86_64 because currently it's on
only when pointer size >= 64 which is not the case for x32.

http://reviews.llvm.org/D4755

Files:
  lib/Basic/Targets.cpp
  test/Sema/types.c

Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -3402,6 +3402,8 @@
     return CC_C;
   }
 
+  // for x32 we need it here explicitly
+  bool hasInt128Type() const override { return true; }
 };
 } // end anonymous namespace
 
Index: test/Sema/types.c
===================================================================
--- test/Sema/types.c
+++ test/Sema/types.c
@@ -1,4 +1,6 @@
 // RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9
+// 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];
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -3402,6 +3402,8 @@
     return CC_C;
   }
 
+  // for x32 we need it here explicitly
+  bool hasInt128Type() const override { return true; }
 };
 } // end anonymous namespace
 
Index: test/Sema/types.c
===================================================================
--- test/Sema/types.c
+++ test/Sema/types.c
@@ -1,4 +1,6 @@
 // RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9
+// 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];
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to