r201375 - Debug info: Make DWARF4 the default for Darwin, too.
Adrian Prantl
aprantl at apple.com
Thu Feb 13 16:29:34 PST 2014
Author: adrian
Date: Thu Feb 13 18:29:33 2014
New Revision: 201375
URL: http://llvm.org/viewvc/llvm-project?rev=201375&view=rev
Log:
Debug info: Make DWARF4 the default for Darwin, too.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/CodeGen/dwarf-version.c
cfe/trunk/test/Driver/clang-g-opts.c
cfe/trunk/test/Driver/debug-options.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=201375&r1=201374&r2=201375&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Feb 13 18:29:33 2014
@@ -2657,9 +2657,6 @@ void Clang::ConstructJob(Compilation &C,
// FIXME: we should support specifying dwarf version with
// -gline-tables-only.
CmdArgs.push_back("-gline-tables-only");
- // Default is dwarf-2 for darwin.
- if (getToolChain().getTriple().isOSDarwin())
- CmdArgs.push_back("-gdwarf-2");
} else if (A->getOption().matches(options::OPT_gdwarf_2))
CmdArgs.push_back("-gdwarf-2");
else if (A->getOption().matches(options::OPT_gdwarf_3))
@@ -2667,13 +2664,8 @@ void Clang::ConstructJob(Compilation &C,
else if (A->getOption().matches(options::OPT_gdwarf_4))
CmdArgs.push_back("-gdwarf-4");
else if (!A->getOption().matches(options::OPT_g0) &&
- !A->getOption().matches(options::OPT_ggdb0)) {
- // Default is dwarf-2 for darwin.
- if (getToolChain().getTriple().isOSDarwin())
- CmdArgs.push_back("-gdwarf-2");
- else
- CmdArgs.push_back("-g");
- }
+ !A->getOption().matches(options::OPT_ggdb0))
+ CmdArgs.push_back("-g");
}
// We ignore flags -gstrict-dwarf and -grecord-gcc-switches for now.
Modified: cfe/trunk/test/CodeGen/dwarf-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/dwarf-version.c?rev=201375&r1=201374&r2=201375&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/dwarf-version.c (original)
+++ cfe/trunk/test/CodeGen/dwarf-version.c Thu Feb 13 18:29:33 2014
@@ -11,4 +11,4 @@ int main (void) {
// VER3: metadata !{i32 2, metadata !"Dwarf Version", i32 3}
// VER4: metadata !{i32 2, metadata !"Dwarf Version", i32 4}
// LINUX: metadata !{i32 2, metadata !"Dwarf Version", i32 4}
-// DARWIN: metadata !{i32 2, metadata !"Dwarf Version", i32 2}
+// DARWIN: metadata !{i32 2, metadata !"Dwarf Version", i32 4}
Modified: cfe/trunk/test/Driver/clang-g-opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-g-opts.c?rev=201375&r1=201374&r2=201375&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-g-opts.c (original)
+++ cfe/trunk/test/Driver/clang-g-opts.c Thu Feb 13 18:29:33 2014
@@ -12,5 +12,5 @@
// CHECK-WITHOUT-G-NOT: "-g"
// CHECK-WITH-G: "-g"
-// CHECK-WITH-G-DARWIN: "-gdwarf-2"
+// CHECK-WITH-G-DARWIN: "-g"
Modified: cfe/trunk/test/Driver/debug-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=201375&r1=201374&r2=201375&view=diff
==============================================================================
--- cfe/trunk/test/Driver/debug-options.c (original)
+++ cfe/trunk/test/Driver/debug-options.c Thu Feb 13 18:29:33 2014
@@ -36,11 +36,11 @@
// RUN: %clang -### -c -gline-tables-only %s 2>&1 \
// RUN: | FileCheck -check-prefix=GLTO_ONLY %s
// RUN: %clang -### -c -gline-tables-only %s -target x86_64-apple-darwin 2>&1 \
-// RUN: | FileCheck -check-prefix=GLTO_ONLY_DARWIN %s
+// RUN: | FileCheck -check-prefix=GLTO_ONLY %s
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-linux-gnu 2>&1 \
// RUN: | FileCheck -check-prefix=G_ONLY %s
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-apple-darwin 2>&1 \
-// RUN: | FileCheck -check-prefix=G_ONLY_DARWIN %s
+// RUN: | FileCheck -check-prefix=G_ONLY %s
// RUN: %clang -### -c -gline-tables-only -g0 %s 2>&1 \
// RUN: | FileCheck -check-prefix=GLTO_NO %s
//
@@ -74,22 +74,11 @@
// GLTO_ONLY: "-gline-tables-only"
// GLTO_ONLY-NOT: "-g"
//
-// GLTO_ONLY_DARWIN: "-cc1"
-// GLTO_ONLY_DARWIN-NOT: "-g"
-// GLTO_ONLY_DARWIN: "-gline-tables-only"
-// GLTO_ONLY_DARWIN: "-gdwarf-2"
-// GLTO_ONLY_DARWIN-NOT: "-g"
-//
// G_ONLY: "-cc1"
// G_ONLY-NOT: "-gline-tables-only"
// G_ONLY: "-g"
// G_ONLY-NOT: "-gline-tables-only"
//
-// G_ONLY_DARWIN: "-cc1"
-// G_ONLY_DARWIN-NOT: "-gline-tables-only"
-// G_ONLY_DARWIN: "-gdwarf-2"
-// G_ONLY_DARWIN-NOT: "-gline-tables-only"
-//
// GLTO_NO: "-cc1"
// GLTO_NO-NOT: "-gline-tables-only"
//
More information about the cfe-commits
mailing list