diff options
author | Sebastian Pop <spop@codeaurora.org> | 2012-01-05 18:28:46 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2012-01-05 18:28:46 +0000 |
commit | 6e9b5eb51bb623995c90295d265a7682277653a1 (patch) | |
tree | c333ba442ddedfb74ac79b9a5f8541e2d0f3fafb /lib/Support/Unix/Host.inc | |
parent | 0fcccd4d45b593bc11e56ff5be36a04836749376 (diff) |
revert r147542 after comments from Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix/Host.inc')
-rw-r--r-- | lib/Support/Unix/Host.inc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc index 82f717fc39..726e2fbcf0 100644 --- a/lib/Support/Unix/Host.inc +++ b/lib/Support/Unix/Host.inc @@ -35,9 +35,13 @@ static std::string getOSVersion() { return info.release; } -std::string getTriple(StringRef &TripleString) { - std::pair<StringRef, StringRef> ArchSplit = TripleString.split('-'); +std::string sys::getDefaultTargetTriple() { + StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE); + std::pair<StringRef, StringRef> ArchSplit = TargetTripleString.split('-'); + + // Normalize the arch, since the target triple may not actually match the target. std::string Arch = ArchSplit.first; + std::string Triple(Arch); Triple += '-'; Triple += ArchSplit.second; @@ -57,13 +61,3 @@ std::string getTriple(StringRef &TripleString) { return Triple; } - -std::string sys::getDefaultTargetTriple() { - StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE); - return getTriple(TargetTripleString); -} - -std::string sys::getHostTriple() { - StringRef HostTripleString(LLVM_HOST_TRIPLE); - return getTriple(HostTripleString); -} |