From 9bc23ad6140172ba960b6616b45e96a9b14a09aa Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 2 Dec 2010 23:03:57 +0000 Subject: [PATCH] Disable .loc support on older darwin OSes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120747 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llc/llc.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index d34a3ed745a..bb426a9de8c 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -278,6 +278,18 @@ 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; + } + } // Figure out where we are going to send the output... OwningPtr Out