llvm.org GIT mirror llvm / d285139
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 Daniel Dunbar 9 years ago
3 changed file(s) with 7 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llc -O2 < %s | FileCheck %s
11 ; RUN: llc -O2 -regalloc=basic < %s | FileCheck %s
22 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
3 target triple = "x86_64-apple-darwin"
3 target triple = "x86_64-apple-darwin10"
44
55 %struct.a = type { i32, %struct.a* }
66
None ; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
1 ; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s
0 ; RUN: llc -mtriple=x86_64-apple-darwin10 < %s | FileCheck %s
1 ; RUN: llc -mtriple=x86_64-apple-darwin10 -regalloc=basic < %s | FileCheck %s
22
33 %struct.a = type { i32 }
44
277277
278278 if (DisableDotLoc)
279279 Target.setMCUseLoc(false);
280 if (TheTriple.getOS() == Triple::Darwin) {
281 switch (TheTriple.getDarwinMajorNumber()) {
282 case 7:
283 case 8:
284 case 9:
285 // disable .loc support for older darwin OS.
286 Target.setMCUseLoc(false);
287 break;
288 default:
289 break;
290 }
291 }
280
281 // Disable .loc support for older OS X versions.
282 if (TheTriple.isOSX() && TheTriple.isOSXVersionLT(10, 5))
283 Target.setMCUseLoc(false);
292284
293285 // Figure out where we are going to send the output...
294286 OwningPtr Out