mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 16:36:40 +00:00
Extract target triplet from optimized module.
Untabify. llvm-svn: 30123
This commit is contained in:
parent
82fabe541b
commit
208eaf86a6
@ -56,8 +56,8 @@ namespace llvm {
|
||||
void mayBeNotUsed();
|
||||
|
||||
LLVMSymbol (enum LTOLinkageTypes lt, GlobalValue *g, const std::string &n,
|
||||
const std::string &m) : linkage(lt), gv(g), name(n),
|
||||
mangledName(m) {}
|
||||
const std::string &m) : linkage(lt), gv(g), name(n),
|
||||
mangledName(m) {}
|
||||
|
||||
const char *getName() { return name.c_str(); }
|
||||
const char *getMangledName() { return mangledName.c_str(); }
|
||||
@ -82,13 +82,14 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
typedef hash_map<const char*, LLVMSymbol*, hash<const char*>,
|
||||
string_compare> NameToSymbolMap;
|
||||
string_compare> NameToSymbolMap;
|
||||
|
||||
enum LTOStatus readLLVMObjectFile(const std::string &InputFilename,
|
||||
NameToSymbolMap &symbols,
|
||||
std::set<std::string> &references);
|
||||
NameToSymbolMap &symbols,
|
||||
std::set<std::string> &references);
|
||||
enum LTOStatus optimizeModules(const std::string &OutputFilename,
|
||||
std::vector<const char*> &exportList);
|
||||
std::vector<const char*> &exportList,
|
||||
std::string &targetTriple);
|
||||
|
||||
private:
|
||||
std::vector<Module *> modules;
|
||||
|
@ -266,7 +266,8 @@ static enum LTOStatus lto_optimize(Module *M, std::ostream &Out,
|
||||
/// Return appropriate LTOStatus.
|
||||
enum LTOStatus
|
||||
LinkTimeOptimizer::optimizeModules(const std::string &OutputFilename,
|
||||
std::vector<const char *> &exportList)
|
||||
std::vector<const char *> &exportList,
|
||||
std::string &targetTriple)
|
||||
{
|
||||
if (modules.empty())
|
||||
return LTO_NO_WORK;
|
||||
@ -316,6 +317,8 @@ LinkTimeOptimizer::optimizeModules(const std::string &OutputFilename,
|
||||
return status;
|
||||
}
|
||||
|
||||
targetTriple = bigOne->getTargetTriple();
|
||||
|
||||
// Run GCC to assemble and link the program into native code.
|
||||
//
|
||||
// Note:
|
||||
|
Loading…
Reference in New Issue
Block a user