Remove -fobjc-tight-layout, seems to work!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71184 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index fa5b689..fba474b 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -37,9 +37,6 @@
   unsigned ObjC1             : 1;  // Objective-C 1 support enabled.
   unsigned ObjC2             : 1;  // Objective-C 2 support enabled.
   unsigned ObjCNonFragileABI : 1;  // Objective-C modern abi enabled
-  unsigned ObjCTightLayout   : 1;  // Use tight interface layout, in
-                                   // which subclass ivars can be
-                                   // placed inside the superclass.
     
   unsigned PascalStrings     : 1;  // Allow Pascal strings
   unsigned WritableStrings   : 1;  // Allow writable strings
@@ -103,7 +100,7 @@
     Trigraphs = BCPLComment = DollarIdents = AsmPreprocessor = 0;
     GNUMode = ImplicitInt = Digraphs = 0;
     HexFloats = 0;
-    GC = ObjC1 = ObjC2 = ObjCNonFragileABI = ObjCTightLayout = 0;
+    GC = ObjC1 = ObjC2 = ObjCNonFragileABI = 0;
     C99 = Microsoft = CPlusPlus = CPlusPlus0x = 0;
     CXXOperatorNames = PascalStrings = WritableStrings = 0;
     Exceptions = NeXTRuntime = Freestanding = NoBuiltin = 0;
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 3b1a11c..4aed59f 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -715,13 +715,10 @@
   if (ObjCInterfaceDecl *SD = D->getSuperClass()) {
     const ASTRecordLayout &SL = getASTObjCInterfaceLayout(SD);
     unsigned Alignment = SL.getAlignment();
-    uint64_t Size = SL.getSize();
 
-    // If we are using tight interface packing, then we start laying
-    // out ivars not at the end of the superclass structure, but at
-    // the next byte following the last field.
-    if (getLangOptions().ObjCTightLayout)
-      Size = llvm::RoundUpToAlignment(SL.NextOffset, 8);
+    // We start laying out ivars not at the end of the superclass
+    // structure, but at the next byte following the last field.
+    uint64_t Size = llvm::RoundUpToAlignment(SL.NextOffset, 8);
 
     ObjCLayouts[Key] = NewEntry = new ASTRecordLayout(Size, Alignment);
     NewEntry->InitializeLayout(FieldCount);
diff --git a/test/CodeGenObjC/interface-layout-64.m b/test/CodeGenObjC/interface-layout-64.m
index db860e8..13d6a87 100644
--- a/test/CodeGenObjC/interface-layout-64.m
+++ b/test/CodeGenObjC/interface-layout-64.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fobjc-tight-layout -triple x86_64-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-llvm -o %t %s &&
 // RUNX: llvm-gcc -m64 -emit-llvm -S -o %t %s &&
 
 // RUN: grep '@"OBJC_IVAR_$_I3._iv2" = global i64 8, section "__DATA, __objc_const", align 8' %t &&
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index f71be5d..23230b3 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -632,10 +632,6 @@
 
 
 static llvm::cl::opt<bool>
-ObjCTightLayout("fobjc-tight-layout",
-                  llvm::cl::desc("enable tight objective-c interface layout"));
-
-static llvm::cl::opt<bool>
 EmitAllDecls("femit-all-decls",
               llvm::cl::desc("Emit all declarations, even if unused"));
 
@@ -824,8 +820,6 @@
   if (ObjCNonFragileABI)
     Options.ObjCNonFragileABI = 1;
   
-  Options.ObjCTightLayout = 1;
-
   if (EmitAllDecls)
     Options.EmitAllDecls = 1;