r208310 - Enable standalone-debug by default on FreeBSD

Ed Maste emaste at freebsd.org
Thu May 8 06:01:26 PDT 2014


Author: emaste
Date: Thu May  8 08:01:26 2014
New Revision: 208310

URL: http://llvm.org/viewvc/llvm-project?rev=208310&view=rev
Log:
Enable standalone-debug by default on FreeBSD

It was set by default on Darwin in r198655.  The same usability issues
with DTrace and LLDB apply to FreeBSD, so set it by default there too.

rdar://problem/15758808
http://llvm.org/pr19676

Differential Revision: http://reviews.llvm.org/D3448

Modified:
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=208310&r1=208309&r2=208310&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu May  8 08:01:26 2014
@@ -337,9 +337,10 @@ static bool ParseCodeGenArgs(CodeGenOpti
   } else if (Args.hasArg(OPT_g_Flag) || Args.hasArg(OPT_gdwarf_2) ||
              Args.hasArg(OPT_gdwarf_3) || Args.hasArg(OPT_gdwarf_4)) {
     bool Default = false;
-    // Until dtrace (via CTF) can deal with distributed debug info,
-    // Darwin defaults to standalone/full debug info.
-    if (llvm::Triple(TargetOpts.Triple).isOSDarwin())
+    // Until dtrace (via CTF) and LLDB can deal with distributed debug info,
+    // Darwin and FreeBSD default to standalone/full debug info.
+    if (llvm::Triple(TargetOpts.Triple).isOSDarwin() ||
+        llvm::Triple(TargetOpts.Triple).isOSFreeBSD())
       Default = true;
 
     if (Args.hasFlag(OPT_fstandalone_debug, OPT_fno_standalone_debug, Default))

Modified: cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp?rev=208310&r1=208309&r2=208310&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp Thu May  8 08:01:26 2014
@@ -1,8 +1,9 @@
 // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -g -triple amd64-unknown-freebsd %s -o - | FileCheck %s
 //
 // This tests that the "emit debug info for a C++ class only in the
 // module that has its vtable" optimization is disabled by default on
-// Darwin.
+// Darwin and FreeBSD.
 //
 // CHECK: [ DW_TAG_member ] [lost]
 class A





More information about the cfe-commits mailing list