diff options
author | Devang Patel <dpatel@apple.com> | 2006-09-06 20:16:28 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-09-06 20:16:28 +0000 |
commit | a291a68161bd37448404dc10c4815d4420cb2d30 (patch) | |
tree | f576cb73144c39d9f31cd064d4e9620c2bb8abe9 /tools/lto | |
parent | 7c95ad4fb02bd592d7923f2bcc1cbdb8b62de553 (diff) | |
download | external_llvm-a291a68161bd37448404dc10c4815d4420cb2d30.zip external_llvm-a291a68161bd37448404dc10c4815d4420cb2d30.tar.gz external_llvm-a291a68161bd37448404dc10c4815d4420cb2d30.tar.bz2 |
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
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/lto.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index 96b449e..14cfc8e 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -116,6 +116,17 @@ LinkTimeOptimizer::getModule(const std::string &InputFilename) 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. /// Collect global functions and symbol names in symbols vector. /// Collect external references in references vector. |