This patch breaks up Wrap.h so that it does not have to include all of
authorFilip Pizlo <fpizlo@apple.com>
Wed, 1 May 2013 20:59:00 +0000 (20:59 +0000)
committerFilip Pizlo <fpizlo@apple.com>
Wed, 1 May 2013 20:59:00 +0000 (20:59 +0000)
the things, and renames it to CBindingWrapping.h.  I also moved
CBindingWrapping.h into Support/.

This new file just contains the macros for defining different wrap/unwrap
methods.

The calls to those macros, as well as any custom wrap/unwrap definitions
(like for array of Values for example), are put into corresponding C++
headers.

Doing this required some #include surgery, since some .cpp files relied
on the fact that including Wrap.h implicitly caused the inclusion of a
bunch of other things.

This also now means that the C++ headers will include their corresponding
C API headers; for example Value.h must include llvm-c/Core.h.  I think
this is harmless, since the C API headers contain just external function
declarations and some C types, so I don't believe there should be any
nasty dependency issues here.

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

32 files changed:
include/llvm/ExecutionEngine/ExecutionEngine.h
include/llvm/IR/BasicBlock.h
include/llvm/IR/IRBuilder.h
include/llvm/IR/LLVMContext.h
include/llvm/IR/Module.h
include/llvm/IR/Type.h
include/llvm/IR/Use.h
include/llvm/IR/Value.h
include/llvm/PassManager.h
include/llvm/PassRegistry.h
include/llvm/Support/CBindingWrapping.h [new file with mode: 0644]
include/llvm/Support/MemoryBuffer.h
include/llvm/Wrap.h [deleted file]
lib/Analysis/Analysis.cpp
lib/Analysis/IPA/IPA.cpp
lib/Bitcode/Reader/BitReader.cpp
lib/Bitcode/Writer/BitWriter.cpp
lib/CodeGen/CodeGen.cpp
lib/ExecutionEngine/ExecutionEngineBindings.cpp
lib/IR/Core.cpp
lib/Linker/LinkModules.cpp
lib/Object/Object.cpp
lib/Target/Target.cpp
lib/Target/TargetMachineC.cpp
lib/Transforms/IPO/IPO.cpp
lib/Transforms/IPO/PassManagerBuilder.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Instrumentation/Instrumentation.cpp
lib/Transforms/ObjCARC/ObjCARC.cpp
lib/Transforms/Scalar/Scalar.cpp
lib/Transforms/Utils/Utils.cpp
lib/Transforms/Vectorize/Vectorize.cpp

index 9800759484047ef80dd55703f20a29e44fa09dbe..bbaebc6f906b335b2118c07b45224aa7bcd300cc 100644 (file)
@@ -26,7 +26,6 @@
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
-#include "llvm/Wrap.h"
 #include <map>
 #include <string>
 #include <vector>
@@ -634,7 +633,8 @@ public:
   ExecutionEngine *create(TargetMachine *TM);
 };
 
-DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ExecutionEngine,    LLVMExecutionEngineRef)
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ExecutionEngine, LLVMExecutionEngineRef)
 
 } // End llvm namespace
 
index ea5695a9e640962b4be157b0e5a6ff2491cdccbe..3bdc95d556f36b571f2572c5bc391e41acafd0ce 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/ADT/ilist.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/SymbolTableListTraits.h"
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/DataTypes.h"
 
 namespace llvm {
@@ -298,6 +299,9 @@ private:
   }
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(BasicBlock, LLVMBasicBlockRef)
+
 } // End llvm namespace
 
 #endif
index 1c71d0a90146b46797e1559b5c0bdc1ade3f1dc2..189ba3d305c41fdbda2977098c99c8c2a593c830 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Operator.h"
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/ConstantFolder.h"
 
 namespace llvm {
@@ -1396,6 +1397,9 @@ public:
   }
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(IRBuilder<>, LLVMBuilderRef)
+
 }
 
 #endif
index ae81e5b1c3bc2ea1f0982e70db6455b65bbf7311..f25d820c2bb995360fff7a992487183c1714a848 100644 (file)
@@ -15,7 +15,9 @@
 #ifndef LLVM_IR_LLVMCONTEXT_H
 #define LLVM_IR_LLVMCONTEXT_H
 
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm-c/Core.h"
 
 namespace llvm {
 
@@ -109,6 +111,19 @@ private:
 /// only care about operating on a single thread.
 extern LLVMContext &getGlobalContext();
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext, LLVMContextRef)
+
+/* Specialized opaque context conversions.
+ */
+inline LLVMContext **unwrap(LLVMContextRef* Tys) {
+  return reinterpret_cast<LLVMContext**>(Tys);
+}
+
+inline LLVMContextRef *wrap(const LLVMContext **Tys) {
+  return reinterpret_cast<LLVMContextRef*>(const_cast<LLVMContext**>(Tys));
+}
+
 }
 
 #endif
index 4460aa435b945fa7b808c747961811bc0841647d..cb500ffe7cb6a642b715b077c5e2fad7f5dad7a2 100644 (file)
@@ -20,6 +20,7 @@
 #include "llvm/IR/GlobalAlias.h"
 #include "llvm/IR/GlobalVariable.h"
 #include "llvm/IR/Metadata.h"
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/DataTypes.h"
 
 namespace llvm {
@@ -584,6 +585,16 @@ inline raw_ostream &operator<<(raw_ostream &O, const Module &M) {
   return O;
 }
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Module, LLVMModuleRef)
+
+/* LLVMModuleProviderRef exists for historical reasons, but now just holds a
+ * Module.
+ */
+inline Module *unwrap(LLVMModuleProviderRef MP) {
+  return reinterpret_cast<Module*>(MP);
+}
+  
 } // End llvm namespace
 
 #endif
index d89ae243f5e787ac4172c39e8b70a204a19101c8..1bf8789d30724c17d62a8a9c13122dd03bc5b52c 100644 (file)
 
 #include "llvm/ADT/APFloat.h"
 #include "llvm/Support/Casting.h"
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm-c/Core.h"
 
 namespace llvm {
 
@@ -467,6 +469,19 @@ template <> struct GraphTraits<const Type*> {
   }
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_ISA_CONVERSION_FUNCTIONS(Type, LLVMTypeRef)
+
+/* Specialized opaque type conversions.
+ */
+inline Type **unwrap(LLVMTypeRef* Tys) {
+  return reinterpret_cast<Type**>(Tys);
+}
+
+inline LLVMTypeRef *wrap(Type **Tys) {
+  return reinterpret_cast<LLVMTypeRef*>(const_cast<Type**>(Tys));
+}
+  
 } // End llvm namespace
 
 #endif
index 4bc7ce5000583c0e970dd61f8c29762c77027233..efd8b48a0e9bebd6b36d890d79f3ea78cc0d31ae 100644 (file)
@@ -26,7 +26,9 @@
 #define LLVM_IR_USE_H
 
 #include "llvm/ADT/PointerIntPair.h"
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm-c/Core.h"
 #include <cstddef>
 #include <iterator>
 
@@ -214,6 +216,9 @@ public:
   unsigned getOperandNo() const;
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseRef)
+
 } // End llvm namespace
 
 #endif
index a4f78627a84d5ea5d4184aefc7d8d62bcd82ca86..fb61a2ac70d901a881b91f4cf2bfabbdae90da86 100644 (file)
@@ -16,7 +16,9 @@
 
 #include "llvm/IR/Use.h"
 #include "llvm/Support/Casting.h"
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm-c/Core.h"
 
 namespace llvm {
 
@@ -406,6 +408,29 @@ public:
   enum { NumLowBitsAvailable = 2 };
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_ISA_CONVERSION_FUNCTIONS(Value, LLVMValueRef)
+
+/* Specialized opaque value conversions.
+ */ 
+inline Value **unwrap(LLVMValueRef *Vals) {
+  return reinterpret_cast<Value**>(Vals);
+}
+
+template<typename T>
+inline T **unwrap(LLVMValueRef *Vals, unsigned Length) {
+#ifdef DEBUG
+  for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I)
+    cast<T>(*I);
+#endif
+  (void)Length;
+  return reinterpret_cast<T**>(Vals);
+}
+
+inline LLVMValueRef *wrap(const Value **Vals) {
+  return reinterpret_cast<LLVMValueRef*>(const_cast<Value**>(Vals));
+}
+
 } // End llvm namespace
 
 #endif
index ce5fda79f9c7f9c73c1301d63854ea2e0c1af9a9..b6a8186a4e809b2049b01bfcdf143cd9778bfb65 100644 (file)
@@ -18,6 +18,7 @@
 #define LLVM_PASSMANAGER_H
 
 #include "llvm/Pass.h"
+#include "llvm/Support/CBindingWrapping.h"
 
 namespace llvm {
 
@@ -98,6 +99,9 @@ private:
   Module *M;
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBase, LLVMPassManagerRef)
+
 } // End llvm namespace
 
 #endif
index 5d89c492218d8e7dab03ab2e62bd6c59baa9cd52..f49c953e44f2e0f3e8defd7b2cc2fa92be5b310e 100644 (file)
@@ -18,6 +18,8 @@
 #define LLVM_PASSREGISTRY_H
 
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/CBindingWrapping.h"
+#include "llvm-c/Core.h"
 
 namespace llvm {
 
@@ -79,6 +81,9 @@ public:
   void removeRegistrationListener(PassRegistrationListener *L);
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassRegistry, LLVMPassRegistryRef)
+
 }
 
 #endif
diff --git a/include/llvm/Support/CBindingWrapping.h b/include/llvm/Support/CBindingWrapping.h
new file mode 100644 (file)
index 0000000..58ecb41
--- /dev/null
@@ -0,0 +1,46 @@
+//===- llvm/Wrap.h - C++ Type Wrapping for the C Interface  -----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file declares the wrapping macros for the C interface.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_C_BINDING_WRAPPING_H
+#define LLVM_C_BINDING_WRAPPING_H
+
+#include "llvm/Support/Casting.h"
+
+#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)     \
+  inline ty *unwrap(ref P) {                            \
+    return reinterpret_cast<ty*>(P);                    \
+  }                                                     \
+                                                        \
+  inline ref wrap(const ty *P) {                        \
+    return reinterpret_cast<ref>(const_cast<ty*>(P));   \
+  }
+
+#define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)        \
+  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)           \
+                                                        \
+  template<typename T>                                  \
+  inline T *unwrap(ref P) {                             \
+    return cast<T>(unwrap(P));                          \
+  }
+
+#define DEFINE_STDCXX_CONVERSION_FUNCTIONS(ty, ref)     \
+  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)           \
+                                                        \
+  template<typename T>                                  \
+  inline T *unwrap(ref P) {                             \
+    T *Q = (T*)unwrap(P);                               \
+    assert(Q && "Invalid cast!");                       \
+    return Q;                                           \
+  }
+
+#endif
index 1f02907d9f9aec8348199fe0eec53373565fdbba..0cce726d4862c67e317b1e715bf614fd66d3d53f 100644 (file)
 #define LLVM_SUPPORT_MEMORYBUFFER_H
 
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/DataTypes.h"
+#include "llvm-c/Core.h"
 
 namespace llvm {
 
@@ -137,6 +139,9 @@ public:
   virtual BufferKind getBufferKind() const = 0;  
 };
 
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(MemoryBuffer, LLVMMemoryBufferRef)
+
 } // end namespace llvm
 
 #endif
diff --git a/include/llvm/Wrap.h b/include/llvm/Wrap.h
deleted file mode 100644 (file)
index 0dc5c78..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-//===- llvm/Wrap.h - C++ Type Wrapping for the C Interface  -----*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file declares the wrapping functions for the C interface.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_WRAP_H
-#define LLVM_WRAP_H
-
-#include "llvm-c/Core.h"
-#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/IRBuilder.h"
-#include "llvm/IR/Module.h"
-#include "llvm/IR/Type.h"
-#include "llvm/PassRegistry.h"
-
-/* When included into a C++ source file, also declares 'wrap' and 'unwrap'
-  helpers to perform opaque reference<-->pointer conversions. These helpers
-  are shorter and more tightly typed than writing the casts by hand when
-  authoring bindings. In assert builds, they will do runtime type checking.
-
-  Need these includes to support the LLVM 'cast' template for the C++ 'wrap' 
-  and 'unwrap' conversion functions. */
-
-namespace llvm {
-  class MemoryBuffer;
-  class PassManagerBase;
-  struct GenericValue;
-  class ExecutionEngine;
-
-  #define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)   \
-    inline ty *unwrap(ref P) {                          \
-      return reinterpret_cast<ty*>(P);                  \
-    }                                                   \
-                                                        \
-    inline ref wrap(const ty *P) {                      \
-      return reinterpret_cast<ref>(const_cast<ty*>(P)); \
-    }
-  
-  #define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)      \
-    DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)         \
-                                                        \
-    template<typename T>                                \
-    inline T *unwrap(ref P) {                           \
-      return cast<T>(unwrap(P));                        \
-    }
-  
-  #define DEFINE_STDCXX_CONVERSION_FUNCTIONS(ty, ref)   \
-    DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)         \
-                                                        \
-    template<typename T>                                \
-    inline T *unwrap(ref P) {                           \
-      T *Q = (T*)unwrap(P);                             \
-      assert(Q && "Invalid cast!");                     \
-      return Q;                                         \
-    }
-  
-  DEFINE_ISA_CONVERSION_FUNCTIONS   (Type,               LLVMTypeRef          )
-  DEFINE_ISA_CONVERSION_FUNCTIONS   (Value,              LLVMValueRef         )
-  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Module,             LLVMModuleRef        )
-  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(BasicBlock,         LLVMBasicBlockRef    )
-  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(IRBuilder<>,        LLVMBuilderRef       )
-  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(MemoryBuffer,       LLVMMemoryBufferRef  )
-  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext,        LLVMContextRef       )
-  DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use,                LLVMUseRef           )
-  DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBase,    LLVMPassManagerRef   )
-  DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassRegistry,       LLVMPassRegistryRef  )
-
-  /* LLVMModuleProviderRef exists for historical reasons, but now just holds a
-   * Module.
-   */
-  inline Module *unwrap(LLVMModuleProviderRef MP) {
-    return reinterpret_cast<Module*>(MP);
-  }
-  
-  /* Specialized opaque context conversions.
-   */
-  inline LLVMContext **unwrap(LLVMContextRef* Tys) {
-    return reinterpret_cast<LLVMContext**>(Tys);
-  }
-  
-  inline LLVMContextRef *wrap(const LLVMContext **Tys) {
-    return reinterpret_cast<LLVMContextRef*>(const_cast<LLVMContext**>(Tys));
-  }
-  
-  /* Specialized opaque type conversions.
-   */
-  inline Type **unwrap(LLVMTypeRef* Tys) {
-    return reinterpret_cast<Type**>(Tys);
-  }
-  
-  inline LLVMTypeRef *wrap(Type **Tys) {
-    return reinterpret_cast<LLVMTypeRef*>(const_cast<Type**>(Tys));
-  }
-  
-  /* Specialized opaque value conversions.
-   */ 
-  inline Value **unwrap(LLVMValueRef *Vals) {
-    return reinterpret_cast<Value**>(Vals);
-  }
-  
-  template<typename T>
-  inline T **unwrap(LLVMValueRef *Vals, unsigned Length) {
-    #ifdef DEBUG
-    for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I)
-      cast<T>(*I);
-    #endif
-    (void)Length;
-    return reinterpret_cast<T**>(Vals);
-  }
-  
-  inline LLVMValueRef *wrap(const Value **Vals) {
-    return reinterpret_cast<LLVMValueRef*>(const_cast<Value**>(Vals));
-  }
-}
-
-#endif
index 141a493aa8c7a106b3ddf5edd90827241287952c..349c4178c2449f4d99f430a50e0fbd9e8e8e471b 100644 (file)
@@ -9,9 +9,10 @@
 
 #include "llvm-c/Analysis.h"
 #include "llvm-c/Initialization.h"
-#include "llvm/Wrap.h"
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/InitializePasses.h"
+#include "llvm/IR/Module.h"
+#include "llvm/PassRegistry.h"
 #include <cstring>
 
 using namespace llvm;
index e164e1dafdd16a5823ea7a262776cd53bb5b3f27..1c1816dfd843a266d38cd8c675ca0753f93f0fbb 100644 (file)
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/InitializePasses.h"
-#include "llvm/Wrap.h"
+#include "llvm/PassRegistry.h"
 #include "llvm-c/Initialization.h"
 
 using namespace llvm;
index d777c8c6aad36ef57cb91cbbf7211018415b095f..23630e552541906c0ae1bb9de2756edec351b213 100644 (file)
@@ -8,9 +8,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm-c/BitReader.h"
-#include "llvm/Wrap.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include <cstring>
 #include <string>
index a8b0cc4f4b5a93340d616d35e1d3521add3de5b5..985208c40fdbf4a8c65cadbcbc7222375be53266 100644 (file)
@@ -8,8 +8,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm-c/BitWriter.h"
-#include "llvm/Wrap.h"
 #include "llvm/Bitcode/ReaderWriter.h"
+#include "llvm/IR/Module.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
index 124fd4008ad69a24f9b678e26e21a0651e4541d9..c641991d408d1168d8a914254fc24b2c4e06c5c1 100644 (file)
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/InitializePasses.h"
-#include "llvm/Wrap.h"
+#include "llvm/PassRegistry.h"
 #include "llvm-c/Initialization.h"
 
 using namespace llvm;
index 44fa92205b282410d13e310b6fd455a50fd6b984..f66dc1dfea5e086b0d892555c6b523b78284f595 100644 (file)
 #include "llvm-c/ExecutionEngine.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 #include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/Module.h"
 #include "llvm/Support/ErrorHandling.h"
 #include <cstring>
 
 using namespace llvm;
 
 // Wrapping the C bindings types.
-DEFINE_SIMPLE_CONVERSION_FUNCTIONS(GenericValue,       LLVMGenericValueRef  )
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(GenericValue, LLVMGenericValueRef)
 
 inline DataLayout *unwrap(LLVMTargetDataRef P) {
   return reinterpret_cast<DataLayout*>(P);
index c79c483774266271c213b69c982eadd8e586a063..889d5742906aae51bfd9bb02ca972c65b3651cb8 100644 (file)
@@ -13,7 +13,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm-c/Core.h"
-#include "llvm/Wrap.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/IR/Attributes.h"
 #include "llvm/IR/Constants.h"
@@ -22,7 +21,9 @@
 #include "llvm/IR/GlobalVariable.h"
 #include "llvm/IR/InlineAsm.h"
 #include "llvm/IR/IntrinsicInst.h"
+#include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/Support/CallSite.h"
 #include "llvm/Support/Debug.h"
index d3526a690153a62def010590e2b79d366a178cb0..74cbdadd61eba980e69aa22c382beb5b8e9d5e94 100644 (file)
@@ -12,7 +12,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Linker.h"
-#include "llvm/Wrap.h"
 #include "llvm-c/Linker.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/Optional.h"
index ea641a4831ce0bf62a57251a8f38dfb0abfed53b..3e2c78ec47c180776b4a3893821380634038cef0 100644 (file)
@@ -12,9 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/ADT/SmallVector.h"
 #include "llvm/Object/ObjectFile.h"
 #include "llvm-c/Object.h"
-#include "llvm/Wrap.h"
 
 using namespace llvm;
 using namespace object;
index c96235c9538a1dcd38254d7a9fa6fd61d5af0f94..3d92f297be2176f7831ef437d83d9cae8a9b362d 100644 (file)
@@ -16,9 +16,9 @@
 #include "llvm-c/Initialization.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Value.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/PassManager.h"
-#include "llvm/Wrap.h"
 #include "llvm/Target/TargetLibraryInfo.h"
 #include <cstring>
 
index 7c644fcfcaa810e54d6358f3b5f56cac6b1a2a38..19e78b83a74c4b003f0e03f763dea7e822b8d046 100644 (file)
@@ -17,7 +17,6 @@
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/Module.h"
 #include "llvm/PassManager.h"
-#include "llvm/Wrap.h"
 #include "llvm/Support/CodeGen.h"
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Support/TargetRegistry.h"
index f40a1b1f024f41acf2ebac67050e60fccfa0e582..5d563d8bbf512fd07daa3d66b739bc7f22ff58b3 100644 (file)
@@ -17,7 +17,6 @@
 #include "llvm-c/Transforms/IPO.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/PassManager.h"
-#include "llvm/Wrap.h"
 #include "llvm/Transforms/IPO.h"
 
 using namespace llvm;
index e6e6f6ace44d37d5f2b5df5f585b122a5eda247d..986c0b8928c58c412995b99922493d2a4c87a2a0 100644 (file)
@@ -19,7 +19,6 @@
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/PassManager.h"
-#include "llvm/Wrap.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Target/TargetLibraryInfo.h"
index fc832dc0c35823109eaf53679e66715492c60320..c6115e3e91fe51d90d0ecf093e5891b09a803209 100644 (file)
@@ -53,7 +53,6 @@
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/Target/TargetLibraryInfo.h"
 #include "llvm/Transforms/Utils/Local.h"
-#include "llvm/Wrap.h"
 #include <algorithm>
 #include <climits>
 using namespace llvm;
index d5207b74baed44b78cf9d834a856afb60e3c4a37..9f353967f394ea848989699a6dd7a8d32182015a 100644 (file)
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/InitializePasses.h"
-#include "llvm/Wrap.h"
+#include "llvm/PassRegistry.h"
 #include "llvm-c/Initialization.h"
 
 using namespace llvm;
index b76a33668dee283da88f1aae4cd66667f7a8049f..373168e89888532c716d63bf7e3c07f7e6ac4a7e 100644 (file)
@@ -17,7 +17,6 @@
 #include "llvm-c/Core.h"
 #include "llvm-c/Initialization.h"
 #include "llvm/InitializePasses.h"
-#include "llvm/Wrap.h"
 #include "llvm/Support/CommandLine.h"
 
 namespace llvm {
index a7dc26e202669b07ccf802674800ab49eb123eff..8a9c7da113c1f0a6fa59f5c103ac971b6d99fe15 100644 (file)
@@ -21,7 +21,6 @@
 #include "llvm/IR/DataLayout.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/PassManager.h"
-#include "llvm/Wrap.h"
 
 using namespace llvm;
 
index b7f92df203b180fbec6cb871e45f484a7dde1921..c3df215c294a1cb5e030bed583ebcf2dbcfb72eb 100644 (file)
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/InitializePasses.h"
-#include "llvm/Wrap.h"
+#include "llvm/PassRegistry.h"
 #include "llvm-c/Initialization.h"
 
 using namespace llvm;
index 29e59fa59256e65599596755d243f59100669fd2..a927fe145171e21cd4563c14f96d9bb4feb4b600 100644 (file)
@@ -20,7 +20,6 @@
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/PassManager.h"
-#include "llvm/Wrap.h"
 
 using namespace llvm;