]> granicus.if.org Git - clang/commitdiff
int128_t is apparently 128-bit aligned on all 64-bit targets, and
authorChris Lattner <sabre@nondot.org>
Thu, 30 Apr 2009 02:55:13 +0000 (02:55 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Apr 2009 02:55:13 +0000 (02:55 +0000)
not supported on 32-bit targets, so we can define it to be 128-bit
aligned there too :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70465 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index 6cd016cab818ba2fdf7de0fa803c367cdb2345e4..5f97df904cc343c8e3a3f876ca09c143f295d202 100644 (file)
@@ -413,6 +413,11 @@ ASTContext::getTypeInfo(const Type *T) {
       Width = Target.getLongLongWidth();
       Align = Target.getLongLongAlign();
       break;
+    case BuiltinType::Int128:
+    case BuiltinType::UInt128:
+      Width = 128;
+      Align = 128; // int128_t is 128-bit aligned on all targets.
+      break;
     case BuiltinType::Float:
       Width = Target.getFloatWidth();
       Align = Target.getFloatAlign();
@@ -425,13 +430,6 @@ ASTContext::getTypeInfo(const Type *T) {
       Width = Target.getLongDoubleWidth();
       Align = Target.getLongDoubleAlign();
       break;
-    case BuiltinType::Int128:
-    case BuiltinType::UInt128:
-      Width = 128;
-          
-      // FIXME: Is this correct for all targets?
-      Align = 128;
-      break;
     }
     break;
   case Type::FixedWidthInt: