Re-revert r79555. Apparently it's not just buildbot weirdness.
[oota-llvm.git] / include / llvm / Target / TargetData.h
index b0ea291249a324bf3aca44f5ad60344aad375cbd..23775be70f9b177917f0c9f604289b7f47cee33b 100644 (file)
@@ -91,9 +91,6 @@ private:
    */
   static const TargetAlignElem InvalidAlignmentElem;
 
-  /// Opaque pointer for the StructType -> StructLayout map
-  void* LayoutMap;
-
   //! Set/initialize target alignments
   void setAlignment(AlignTypeEnum align_type, unsigned char abi_align,
                     unsigned char pref_align, uint32_t bit_width);
@@ -110,9 +107,6 @@ private:
     return (&align != &InvalidAlignmentElem);
   }
 
-  // DO NOT IMPLEMENT
-  void operator=(const TargetData&);
-  
 public:
   /// Default ctor.
   ///
@@ -124,11 +118,22 @@ public:
   }
 
   /// Constructs a TargetData from a specification string. See init().
-  explicit TargetData(const std::string &TargetDescription);
+  explicit TargetData(const std::string &TargetDescription)
+    : ImmutablePass(&ID) {
+    init(TargetDescription);
+  }
 
   /// Initialize target data from properties stored in the module.
   explicit TargetData(const Module *M);
-  TargetData(const TargetData &TD);
+
+  TargetData(const TargetData &TD) :
+    ImmutablePass(&ID),
+    LittleEndian(TD.isLittleEndian()),
+    PointerMemSize(TD.PointerMemSize),
+    PointerABIAlign(TD.PointerABIAlign),
+    PointerPrefAlign(TD.PointerPrefAlign),
+    Alignments(TD.Alignments)
+  { }
 
   ~TargetData();  // Not virtual, do not subclass this class