mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 19:38:40 +00:00
Add getTargetTriple() that linker can use to query target architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7c95ad4fb0
commit
a291a68161
@ -92,6 +92,7 @@ namespace llvm {
|
|||||||
enum LTOStatus optimizeModules(const std::string &OutputFilename,
|
enum LTOStatus optimizeModules(const std::string &OutputFilename,
|
||||||
std::vector<const char*> &exportList,
|
std::vector<const char*> &exportList,
|
||||||
std::string &targetTriple);
|
std::string &targetTriple);
|
||||||
|
void getTargetTriple(const std::string &InputFilename, std::string &targetTriple);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Module *getModule (const std::string &InputFilename);
|
Module *getModule (const std::string &InputFilename);
|
||||||
|
@ -116,6 +116,17 @@ LinkTimeOptimizer::getModule(const std::string &InputFilename)
|
|||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// InputFilename is a LLVM bytecode file. Reade this bytecode file and
|
||||||
|
/// set corresponding target triplet string.
|
||||||
|
void
|
||||||
|
LinkTimeOptimizer::getTargetTriple(const std::string &InputFilename,
|
||||||
|
std::string &targetTriple)
|
||||||
|
{
|
||||||
|
Module *m = getModule(InputFilename);
|
||||||
|
if (m)
|
||||||
|
targetTriple = m->getTargetTriple();
|
||||||
|
}
|
||||||
|
|
||||||
/// InputFilename is a LLVM bytecode file. Read it using bytecode reader.
|
/// InputFilename is a LLVM bytecode file. Read it using bytecode reader.
|
||||||
/// Collect global functions and symbol names in symbols vector.
|
/// Collect global functions and symbol names in symbols vector.
|
||||||
/// Collect external references in references vector.
|
/// Collect external references in references vector.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user