]> granicus.if.org Git - clang/commitdiff
Compute width/align of objc builtin types (id, etc)
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 2 Aug 2010 18:03:20 +0000 (18:03 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 2 Aug 2010 18:03:20 +0000 (18:03 +0000)
for radar 8258797.

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

lib/AST/ASTContext.cpp

index ef1138eee7238510e3bc2b08ad51bf5a4e2566fc..43873a4efd7341409e882a8d0b26a17de8285de9 100644 (file)
@@ -680,6 +680,12 @@ ASTContext::getTypeInfo(const Type *T) {
       Width = Target.getPointerWidth(0); // C++ 3.9.1p11: sizeof(nullptr_t)
       Align = Target.getPointerAlign(0); //   == sizeof(void*)
       break;
+    case BuiltinType::ObjCId:
+    case BuiltinType::ObjCClass:
+    case BuiltinType::ObjCSel:
+      Width = Target.getPointerWidth(0); 
+      Align = Target.getPointerAlign(0);
+      break;
     }
     break;
   case Type::ObjCObjectPointer: