[cfe-commits] r76327 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang/AST/ASTRecordLayout.h include/clang/AST/RecordLayout.h lib/AST/ASTContext.cpp lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CGObjCGNU.cpp lib/CodeGen/CGObjCMac.cpp lib/CodeGen/CodeGenTypes.cpp lib/CodeGen/TargetABIInfo.cpp

Anders Carlsson andersca at mac.com
Sat Jul 18 12:44:04 PDT 2009


Author: andersca
Date: Sat Jul 18 14:43:29 2009
New Revision: 76327

URL: http://llvm.org/viewvc/llvm-project?rev=76327&view=rev
Log:
Revert r75641.

Added:
    cfe/trunk/include/clang/AST/RecordLayout.h
      - copied unchanged from r75640, cfe/trunk/include/clang/AST/RecordLayout.h
Removed:
    cfe/trunk/include/clang/AST/ASTRecordLayout.h
Modified:
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/lib/AST/ASTContext.cpp
    cfe/trunk/lib/AST/Expr.cpp
    cfe/trunk/lib/AST/ExprConstant.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
    cfe/trunk/lib/CodeGen/TargetABIInfo.cpp

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Sat Jul 18 14:43:29 2009
@@ -165,7 +165,7 @@
 		DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7160C020EE400F66BC5 /* Sema.cpp */; };
 		DE67E71A0C020F4F00F66BC5 /* ParseAST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */; };
 		DE67E7280C02109800F66BC5 /* ParseAST.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7270C02109800F66BC5 /* ParseAST.h */; };
-		DE6951C70C4D1F5D00A5826B /* ASTRecordLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6951C60C4D1F5D00A5826B /* ASTRecordLayout.h */; };
+		DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6951C60C4D1F5D00A5826B /* RecordLayout.h */; };
 		DE6954640C5121BD00A5826B /* Token.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6954630C5121BD00A5826B /* Token.h */; };
 		DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */; };
 		DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704DD10D1668A4009C7762 /* HeaderMap.cpp */; };
@@ -304,7 +304,7 @@
 				DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */,
 				84D9A88C0C1A581300AC7ABC /* AttributeList.h in CopyFiles */,
 				DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */,
-				DE6951C70C4D1F5D00A5826B /* ASTRecordLayout.h in CopyFiles */,
+				DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */,
 				DE6954640C5121BD00A5826B /* Token.h in CopyFiles */,
 				DEF2E95F0C5FBD74000C4259 /* InternalsManual.html in CopyFiles */,
 				DEC63B1C0C7B940600DBF169 /* CFG.h in CopyFiles */,
@@ -565,7 +565,7 @@
 		DE67E7160C020EE400F66BC5 /* Sema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Sema.cpp; path = lib/Sema/Sema.cpp; sourceTree = "<group>"; tabWidth = 2; };
 		DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Sema/ParseAST.cpp; sourceTree = "<group>"; tabWidth = 2; };
 		DE67E7270C02109800F66BC5 /* ParseAST.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ParseAST.h; path = clang/Sema/ParseAST.h; sourceTree = "<group>"; };
-		DE6951C60C4D1F5D00A5826B /* ASTRecordLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTRecordLayout.h; path = clang/AST/ASTRecordLayout.h; sourceTree = "<group>"; tabWidth = 2; };
+		DE6951C60C4D1F5D00A5826B /* RecordLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = RecordLayout.h; path = clang/AST/RecordLayout.h; sourceTree = "<group>"; tabWidth = 2; };
 		DE6954630C5121BD00A5826B /* Token.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Token.h; sourceTree = "<group>"; };
 		DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclObjC.cpp; path = lib/Sema/SemaDeclObjC.cpp; sourceTree = "<group>"; tabWidth = 2; };
 		DE704BD10D1647E7009C7762 /* HeaderMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeaderMap.h; sourceTree = "<group>"; };
@@ -1141,7 +1141,6 @@
 				35BFBD2B0C9EDE1E006CB644 /* ASTConsumer.h */,
 				DE75ED280B044DC90020CF81 /* ASTContext.h */,
 				DEA09A6E0F31756F000C2258 /* ASTDiagnostic.h */,
-				DE6951C60C4D1F5D00A5826B /* ASTRecordLayout.h */,
 				1A72BEAC0D641E9400B085E9 /* Attr.h */,
 				90FB99DE0F98FB1D008F9415 /* DeclContextInternals.h */,
 				90FB99DF0F98FB1D008F9415 /* DeclVisitor.h */,
@@ -1161,6 +1160,7 @@
 				DEDFE5CB0F7206CC0035BD10 /* NestedNameSpecifier.h */,
 				35EE48AE0E0C4CB200715C54 /* ParentMap.h */,
 				3547129D0C88881300B3E1D5 /* PrettyPrinter.h */,
+				DE6951C60C4D1F5D00A5826B /* RecordLayout.h */,
 				DE3452800AEF1B1800DBC861 /* Stmt.h */,
 				DECB73550FA3EE5A00F5FBC7 /* StmtCXX.h */,
 				DE345F210AFD347900DBC861 /* StmtNodes.def */,

Removed: cfe/trunk/include/clang/AST/ASTRecordLayout.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTRecordLayout.h?rev=76326&view=auto

==============================================================================
--- cfe/trunk/include/clang/AST/ASTRecordLayout.h (original)
+++ cfe/trunk/include/clang/AST/ASTRecordLayout.h (removed)
@@ -1,103 +0,0 @@
-//=== ASTRecordLayout.h - Layout information for a struct/union -*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the ASTRecordLayout interface.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_ASTRECORDLAYOUT_H
-#define LLVM_CLANG_AST_ASTRECORDLAYOUT_H
-
-#include "llvm/Support/DataTypes.h"
-
-namespace clang {
-  class ASTContext;
-  class RecordDecl;
-
-/// ASTRecordLayout - 
-/// This class contains layout information for one RecordDecl,
-/// which is a struct/union/class.  The decl represented must be a definition,
-/// not a forward declaration.  
-/// This class is also used to contain layout information for one 
-/// ObjCInterfaceDecl. FIXME - Find appropriate name.
-/// These objects are managed by ASTContext.
-class ASTRecordLayout {
-  uint64_t Size;        // Size of record in bits.
-  uint64_t NextOffset;  // Next available offset
-  uint64_t *FieldOffsets;
-  unsigned Alignment;   // Alignment of record in bits.
-  unsigned FieldCount;  // Number of fields
-  friend class ASTContext;
-
-  ASTRecordLayout(uint64_t S = 0, unsigned A = 8) 
-    : Size(S), NextOffset(S), Alignment(A), FieldCount(0) {}
-  ~ASTRecordLayout() {
-    delete [] FieldOffsets;
-  }
-
-  /// Initialize record layout. N is the number of fields in this record.
-  void InitializeLayout(unsigned N) {
-    FieldCount = N;
-    FieldOffsets = new uint64_t[N];
-  }
-
-  /// Finalize record layout. Adjust record size based on the alignment.
-  void FinalizeLayout(bool ForceNonEmpty = false) {
-    // In C++, records cannot be of size 0.
-    if (ForceNonEmpty && Size == 0)
-      Size = 8;
-    // Finally, round the size of the record up to the alignment of the
-    // record itself.
-    Size = (Size + (Alignment-1)) & ~(Alignment-1);
-  }
-
-  void SetFieldOffset(unsigned FieldNo, uint64_t Offset) {
-    assert (FieldNo < FieldCount && "Invalid Field No");
-    FieldOffsets[FieldNo] = Offset;
-  }
-
-  void SetAlignment(unsigned A) {  Alignment = A; }
-
-  /// LayoutField - Field layout. StructPacking is the specified
-  /// packing alignment (maximum alignment) in bits to use for the
-  /// structure, or 0 if no packing alignment is specified.
-  void LayoutField(const FieldDecl *FD, unsigned FieldNo,
-                   bool IsUnion, unsigned StructPacking,
-                   ASTContext &Context);
-  
-  ASTRecordLayout(const ASTRecordLayout&);   // DO NOT IMPLEMENT
-  void operator=(const ASTRecordLayout&); // DO NOT IMPLEMENT
-public:
-  
-  /// getAlignment - Get the record alignment in bits.
-  unsigned getAlignment() const { return Alignment; }
-
-  /// getSize - Get the record size in bits.
-  uint64_t getSize() const { return Size; }
-  
-  /// getFieldCount - Get the number of fields in the layout.
-  unsigned getFieldCount() const { return FieldCount; }
-  
-  /// getFieldOffset - Get the offset of the given field index, in
-  /// bits.
-  uint64_t getFieldOffset(unsigned FieldNo) const {
-    assert (FieldNo < FieldCount && "Invalid Field No");
-    return FieldOffsets[FieldNo];
-  }
-    
-  /// getNextOffset - Get the next available (unused) offset in the
-  /// structure, in bits.
-  uint64_t getNextOffset() const {
-    return NextOffset;
-  }
-};
-
-}  // end namespace clang
-
-#endif

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Sat Jul 18 14:43:29 2009
@@ -12,12 +12,12 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/ASTRecordLayout.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/Expr.h"
 #include "clang/AST/ExternalASTSource.h"
+#include "clang/AST/RecordLayout.h"
 #include "clang/Basic/Builtins.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Sat Jul 18 14:43:29 2009
@@ -17,6 +17,7 @@
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclTemplate.h"
+#include "clang/AST/RecordLayout.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/Basic/Builtins.h"
 #include "clang/Basic/TargetInfo.h"

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Sat Jul 18 14:43:29 2009
@@ -13,7 +13,7 @@
 
 #include "clang/AST/APValue.h"
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/ASTRecordLayout.h"
+#include "clang/AST/RecordLayout.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/AST/ASTDiagnostic.h"
 #include "clang/Basic/Builtins.h"

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Sat Jul 18 14:43:29 2009
@@ -14,9 +14,9 @@
 #include "CGDebugInfo.h"
 #include "CodeGenModule.h"
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/ASTRecordLayout.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/Expr.h"
+#include "clang/AST/RecordLayout.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Frontend/CompileOptions.h"

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sat Jul 18 14:43:29 2009
@@ -15,6 +15,7 @@
 #include "CodeGenModule.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclObjC.h"
+#include "clang/AST/RecordLayout.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/Basic/TargetInfo.h"
 #include "llvm/Constants.h"

Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Sat Jul 18 14:43:29 2009
@@ -19,9 +19,9 @@
 #include "CodeGenFunction.h"
 
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/ASTRecordLayout.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
+#include "clang/AST/RecordLayout.h"
 #include "clang/AST/StmtObjC.h"
 
 #include "llvm/Intrinsics.h"

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sat Jul 18 14:43:29 2009
@@ -16,9 +16,9 @@
 #include "CodeGenModule.h"
 #include "CodeGenFunction.h"
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/ASTRecordLayout.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
+#include "clang/AST/RecordLayout.h"
 #include "clang/AST/StmtObjC.h"
 #include "clang/Basic/LangOptions.h"
 

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Sat Jul 18 14:43:29 2009
@@ -15,7 +15,7 @@
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/Expr.h"
-#include "clang/AST/ASTRecordLayout.h"
+#include "clang/AST/RecordLayout.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"
 #include "llvm/Target/TargetData.h"

Modified: cfe/trunk/lib/CodeGen/TargetABIInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetABIInfo.cpp?rev=76327&r1=76326&r2=76327&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/TargetABIInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetABIInfo.cpp Sat Jul 18 14:43:29 2009
@@ -14,7 +14,7 @@
 
 #include "ABIInfo.h"
 #include "CodeGenFunction.h"
-#include "clang/AST/ASTRecordLayout.h"
+#include "clang/AST/RecordLayout.h"
 #include "llvm/Type.h"
 
 using namespace clang;





More information about the cfe-commits mailing list