Add doInitialization/doFinalization to DataLayoutPass.
[oota-llvm.git] / include / llvm / IR / DataLayout.h
index 877029f92f0b1d6de8b28ed9a9c864275f422225..4ed10e0be9a18b265201ec1df7d8a48fb47d5ff1 100644 (file)
@@ -184,6 +184,8 @@ public:
   /// Initialize target data from properties stored in the module.
   explicit DataLayout(const Module *M);
 
+  void init(const Module *M);
+
   DataLayout(const DataLayout &DL) : LayoutMap(nullptr) { *this = DL; }
 
   DataLayout &operator=(const DataLayout &DL) {
@@ -466,13 +468,10 @@ public:
 
   const DataLayout &getDataLayout() const { return DL; }
 
-  // For use with the C API. C++ code should always use the constructor that
-  // takes a module.
-  explicit DataLayoutPass(const DataLayout &DL);
-
-  explicit DataLayoutPass(const Module *M);
-
   static char ID; // Pass identification, replacement for typeid
+
+  bool doFinalization(Module &M) override;
+  bool doInitialization(Module &M) override;
 };
 
 /// StructLayout - used to lazily calculate structure layout information for a