Keep track of all modules crated using a name to module map.

Add private member function getMoudle().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30130 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2006-09-06 18:50:26 +00:00
parent 3fc488d0ce
commit 0701a2f70d
2 changed files with 24 additions and 1 deletions

View File

@@ -83,6 +83,8 @@ namespace llvm {
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;
enum LTOStatus readLLVMObjectFile(const std::string &InputFilename,
NameToSymbolMap &symbols,
@@ -91,9 +93,13 @@ namespace llvm {
std::vector<const char*> &exportList,
std::string &targetTriple);
private:
Module *getModule (const std::string &InputFilename);
private:
std::vector<Module *> modules;
NameToSymbolMap allSymbols;
NameToModuleMap allModules;
};
} // End llvm namespace