summaryrefslogtreecommitdiff
path: root/tools/llc
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-04-19 20:46:13 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-04-19 20:46:13 +0000
commitd285139e0e1fc4a2253ebb18415e2abdf573e373 (patch)
tree19a3e00effae1aeabf852e0c659ee009121498ec /tools/llc
parent13fb3b5706bf3778c6b76a39a45a9dca5b215940 (diff)
downloadllvm-d285139e0e1fc4a2253ebb18415e2abdf573e373.tar.gz
llvm-d285139e0e1fc4a2253ebb18415e2abdf573e373.tar.bz2
llvm-d285139e0e1fc4a2253ebb18415e2abdf573e373.tar.xz
llc: Eliminate a use of getDarwinMajorNumber().
- As before, there is a minor semantic change here (evidenced by the test change) for Darwin triples that have no version component. I debated changing the default behavior of isOSVersionLT, but decided it made more sense for triples to be explicit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r--tools/llc/llc.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 7f5fa3ffe8..99d43c8daf 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -278,18 +278,10 @@ int main(int argc, char **argv) {
if (DisableDotLoc)
Target.setMCUseLoc(false);
- if (TheTriple.getOS() == Triple::Darwin) {
- switch (TheTriple.getDarwinMajorNumber()) {
- case 7:
- case 8:
- case 9:
- // disable .loc support for older darwin OS.
- Target.setMCUseLoc(false);
- break;
- default:
- break;
- }
- }
+
+ // Disable .loc support for older OS X versions.
+ if (TheTriple.isOSX() && TheTriple.isOSXVersionLT(10, 5))
+ Target.setMCUseLoc(false);
// Figure out where we are going to send the output...
OwningPtr<tool_output_file> Out