[PATCH] Enable standalone-debug by default on FreeBSD

Ed Maste emaste at freebsd.org
Wed May 7 11:32:40 PDT 2014


Update existing testcase to cover FreeBSD too

http://reviews.llvm.org/D3654

Files:
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGenCXX/debug-info-vtable-optzn.cpp

Index: lib/Frontend/CompilerInvocation.cpp
===================================================================
--- lib/Frontend/CompilerInvocation.cpp
+++ lib/Frontend/CompilerInvocation.cpp
@@ -325,9 +325,10 @@
   } 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))
Index: test/CodeGenCXX/debug-info-vtable-optzn.cpp
===================================================================
--- test/CodeGenCXX/debug-info-vtable-optzn.cpp
+++ test/CodeGenCXX/debug-info-vtable-optzn.cpp
@@ -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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3654.9182.patch
Type: text/x-patch
Size: 1555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140507/04a3854f/attachment.bin>


More information about the cfe-commits mailing list