[Layering] Move GVMaterializer.h into the IR library where its
authorChandler Carruth <chandlerc@gmail.com>
Thu, 6 Mar 2014 03:50:29 +0000 (03:50 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 6 Mar 2014 03:50:29 +0000 (03:50 +0000)
implementation already lived.

After this commit, the only IR-library headers in include/llvm/* are
ones related to the legacy pass infrastructure that I'm planning to
leave there until the new one is farther along.

The only other headers at the top level are linking and initialization
aids that aren't really libraries but just headers.

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

include/llvm/GVMaterializer.h [deleted file]
include/llvm/IR/GVMaterializer.h [new file with mode: 0644]
lib/Bitcode/Reader/BitcodeReader.h
lib/IR/GVMaterializer.cpp
lib/IR/Module.cpp

diff --git a/include/llvm/GVMaterializer.h b/include/llvm/GVMaterializer.h
deleted file mode 100644 (file)
index 8efe50a..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-//===-- llvm/GVMaterializer.h - Interface for GV materializers --*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file provides an abstract interface for loading a module from some
-// place.  This interface allows incremental or random access loading of
-// functions from the file.  This is useful for applications like JIT compilers
-// or interprocedural optimizers that do not need the entire program in memory
-// at the same time.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_GVMATERIALIZER_H
-#define LLVM_GVMATERIALIZER_H
-
-#include "llvm/Support/system_error.h"
-
-namespace llvm {
-
-class Function;
-class GlobalValue;
-class Module;
-
-class GVMaterializer {
-protected:
-  GVMaterializer() {}
-
-public:
-  virtual ~GVMaterializer();
-
-  /// isMaterializable - True if GV can be materialized from whatever backing
-  /// store this GVMaterializer uses and has not been materialized yet.
-  virtual bool isMaterializable(const GlobalValue *GV) const = 0;
-
-  /// isDematerializable - True if GV has been materialized and can be
-  /// dematerialized back to whatever backing store this GVMaterializer uses.
-  virtual bool isDematerializable(const GlobalValue *GV) const = 0;
-
-  /// Materialize - make sure the given GlobalValue is fully read.
-  ///
-  virtual error_code Materialize(GlobalValue *GV) = 0;
-
-  /// Dematerialize - If the given GlobalValue is read in, and if the
-  /// GVMaterializer supports it, release the memory for the GV, and set it up
-  /// to be materialized lazily.  If the Materializer doesn't support this
-  /// capability, this method is a noop.
-  ///
-  virtual void Dematerialize(GlobalValue *) {}
-
-  /// MaterializeModule - make sure the entire Module has been completely read.
-  ///
-  virtual error_code MaterializeModule(Module *M) = 0;
-};
-
-} // End llvm namespace
-
-#endif
diff --git a/include/llvm/IR/GVMaterializer.h b/include/llvm/IR/GVMaterializer.h
new file mode 100644 (file)
index 0000000..6717bc8
--- /dev/null
@@ -0,0 +1,62 @@
+//===- GVMaterializer.h - Interface for GV materializers --------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file provides an abstract interface for loading a module from some
+// place.  This interface allows incremental or random access loading of
+// functions from the file.  This is useful for applications like JIT compilers
+// or interprocedural optimizers that do not need the entire program in memory
+// at the same time.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_IR_GVMATERIALIZER_H
+#define LLVM_IR_GVMATERIALIZER_H
+
+#include "llvm/Support/system_error.h"
+
+namespace llvm {
+
+class Function;
+class GlobalValue;
+class Module;
+
+class GVMaterializer {
+protected:
+  GVMaterializer() {}
+
+public:
+  virtual ~GVMaterializer();
+
+  /// isMaterializable - True if GV can be materialized from whatever backing
+  /// store this GVMaterializer uses and has not been materialized yet.
+  virtual bool isMaterializable(const GlobalValue *GV) const = 0;
+
+  /// isDematerializable - True if GV has been materialized and can be
+  /// dematerialized back to whatever backing store this GVMaterializer uses.
+  virtual bool isDematerializable(const GlobalValue *GV) const = 0;
+
+  /// Materialize - make sure the given GlobalValue is fully read.
+  ///
+  virtual error_code Materialize(GlobalValue *GV) = 0;
+
+  /// Dematerialize - If the given GlobalValue is read in, and if the
+  /// GVMaterializer supports it, release the memory for the GV, and set it up
+  /// to be materialized lazily.  If the Materializer doesn't support this
+  /// capability, this method is a noop.
+  ///
+  virtual void Dematerialize(GlobalValue *) {}
+
+  /// MaterializeModule - make sure the entire Module has been completely read.
+  ///
+  virtual error_code MaterializeModule(Module *M) = 0;
+};
+
+} // End llvm namespace
+
+#endif
index daa16349b842e59bdbaf8422f37eb4db48a4d7c2..1337da10253ff576b665019833796f818450d0da 100644 (file)
@@ -17,8 +17,8 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/Bitcode/BitstreamReader.h"
 #include "llvm/Bitcode/LLVMBitCodes.h"
-#include "llvm/GVMaterializer.h"
 #include "llvm/IR/Attributes.h"
+#include "llvm/IR/GVMaterializer.h"
 #include "llvm/IR/OperandTraits.h"
 #include "llvm/IR/Type.h"
 #include "llvm/IR/ValueHandle.h"
index f77a9c908d5451be77c1c2f1621af212a90d6243..706926d1b9818d0cd1f9eaac24481929a81477ec 100644 (file)
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/GVMaterializer.h"
+#include "llvm/IR/GVMaterializer.h"
 using namespace llvm;
 
 GVMaterializer::~GVMaterializer() {}
index d3ef2195a89f5ab7a5ae4a77567dafd270949e99..6093d35689dab2c2144961559e648727a9bad9d5 100644 (file)
@@ -17,9 +17,9 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"
-#include "llvm/GVMaterializer.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/GVMaterializer.h"
 #include "llvm/IR/InstrTypes.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/LeakDetector.h"