[llvm-commits] CVS: llvm/include/llvm/LinkTimeOptimizer.h
Devang Patel
dpatel at apple.com
Thu Sep 21 10:23:10 PDT 2006
Changes in directory llvm/include/llvm:
LinkTimeOptimizer.h updated: 1.7 -> 1.8
---
Log message:
Use abstract class to facilitate dlopen() interface.
---
Diffs of the changes: (+20 -2)
LinkTimeOptimizer.h | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
Index: llvm/include/llvm/LinkTimeOptimizer.h
diff -u llvm/include/llvm/LinkTimeOptimizer.h:1.7 llvm/include/llvm/LinkTimeOptimizer.h:1.8
--- llvm/include/llvm/LinkTimeOptimizer.h:1.7 Wed Sep 6 15:16:28 2006
+++ llvm/include/llvm/LinkTimeOptimizer.h Thu Sep 21 12:22:55 2006
@@ -75,10 +75,28 @@
return (strcmp(left, right) == 0);
}
};
-
+
+ /// This is abstract class to facilitate dlopen() interface.
+ /// See LTO below for more info.
+ class LinkTimeOptimizer {
+ public:
+ typedef hash_map<const char*, LLVMSymbol*, hash<const char*>,
+ string_compare> NameToSymbolMap;
+ typedef hash_map<const char*, Module*, hash<const char*>,
+ string_compare> NameToModuleMap;
+ virtual enum LTOStatus readLLVMObjectFile(const std::string &,
+ NameToSymbolMap &,
+ std::set<std::string> &) = 0;
+ virtual enum LTOStatus optimizeModules(const std::string &,
+ std::vector<const char*> &,
+ std::string &) = 0;
+ virtual void getTargetTriple(const std::string &, std::string &) = 0;
+ virtual ~LinkTimeOptimizer() = 0;
+ };
+
/// This is the main link time optimization class. It exposes simple API
/// to perform link time optimization using LLVM intermodular optimizer.
- class LinkTimeOptimizer {
+ class LTO : public LinkTimeOptimizer {
public:
typedef hash_map<const char*, LLVMSymbol*, hash<const char*>,
More information about the llvm-commits
mailing list