Add a generic expansion transform: A op (B op' C) -> (A op B) op' (A op C)
[oota-llvm.git] / tools / lto / LTOModule.h
index bfdf6e7fd093489e296848130b05966f4bed74c2..a19acc0d7378ec30995a6c50c56f5a547a8d8d5c 100644 (file)
@@ -32,15 +32,13 @@ namespace llvm {
     class GlobalValue;
     class Value;
     class Function;
-    class LLVMContext;
 }
 
 
 //
 // C++ class which implements the opaque lto_module_t
 //
-class LTOModule {
-public:
+struct LTOModule {
 
     static bool              isBitcodeFile(const void* mem, size_t length);
     static bool              isBitcodeFile(const char* path);
@@ -52,13 +50,12 @@ public:
                                                     const char* triplePrefix);
 
     static LTOModule*        makeLTOModule(const char* path,
-                                          llvm::LLVMContext* Context,
                                           std::string& errMsg);
     static LTOModule*        makeLTOModule(const void* mem, size_t length,
-                                           llvm::LLVMContext* Context,
                                            std::string& errMsg);
 
     const char*              getTargetTriple();
+    void                     setTargetTriple(const char*);
     uint32_t                 getSymbolCount();
     lto_symbol_attributes    getSymbolAttributes(uint32_t index);
     const char*              getSymbolName(uint32_t index);
@@ -91,7 +88,6 @@ private:
                                                     const char* triplePrefix);
 
     static LTOModule*       makeLTOModule(llvm::MemoryBuffer* buffer,
-                                          llvm::LLVMContext* Context,
                                                         std::string& errMsg);
     static llvm::MemoryBuffer* makeBuffer(const void* mem, size_t length);
 
@@ -111,7 +107,5 @@ private:
     llvm::StringMap<NameAndAttributes>      _undefines;
 };
 
-extern std::string getFeatureString(const char *TargetTriple);
-
 #endif // LTO_MODULE_H