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 9de02a2a4e28cbeabf66138a3af0d2ff1873c037..a19acc0d7378ec30995a6c50c56f5a547a8d8d5c 100644 (file)
@@ -38,8 +38,7 @@ namespace llvm {
 //
 // 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);
@@ -50,11 +49,13 @@ public:
     static bool              isBitcodeFileForTarget(const char* path, 
                                                     const char* triplePrefix);
 
-    static LTOModule*        makeLTOModule(const char* path, std::string& errMsg);
+    static LTOModule*        makeLTOModule(const char* path,
+                                          std::string& errMsg);
     static LTOModule*        makeLTOModule(const void* mem, size_t length,
-                                                            std::string& errMsg);
+                                           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);
@@ -83,10 +84,10 @@ private:
     bool                    objcClassNameFromExpression(llvm::Constant* c, 
                                                     std::string& name);
 
-    static bool             isTargetMatch(llvm::MemoryBuffer* memBuffer, 
+    static bool             isTargetMatch(llvm::MemoryBuffer* memBuffer,
                                                     const char* triplePrefix);
 
-    static LTOModule*       makeLTOModule(llvm::MemoryBuffer* buffer, 
+    static LTOModule*       makeLTOModule(llvm::MemoryBuffer* buffer,
                                                         std::string& errMsg);
     static llvm::MemoryBuffer* makeBuffer(const void* mem, size_t length);
 
@@ -106,7 +107,5 @@ private:
     llvm::StringMap<NameAndAttributes>      _undefines;
 };
 
-extern std::string getFeatureString(const char *TargetTriple);
-
 #endif // LTO_MODULE_H