Instead of hard coding global prefix, use TargetAsmInfo.

Add LTO destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2006-10-24 18:41:02 +00:00
parent 2452595927
commit 6152b7ec25
2 changed files with 68 additions and 32 deletions

View File

@ -24,6 +24,7 @@ namespace llvm {
class Module;
class GlobalValue;
class TargetMachine;
enum LTOStatus {
LTO_UNKNOWN,
@ -114,13 +115,24 @@ namespace llvm {
void getTargetTriple(const std::string &InputFilename, std::string &targetTriple);
void removeModule (const std::string &InputFilename);
// Constructors and destructors
LTO() {
/// TODO: Use Target info, it is available at this time.
Target = NULL;
}
~LTO();
private:
Module *getModule (const std::string &InputFilename);
enum LTOStatus optimize(Module *, std::ostream &,
std::vector<const char *> &);
void getTarget(Module *);
private:
std::vector<Module *> modules;
NameToSymbolMap allSymbols;
NameToModuleMap allModules;
TargetMachine *Target;
};
} // End llvm namespace