<br><br><div>On Mon Jan 06 2014 at 5:25:57 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: adrian<br>
Date: Mon Jan  6 19:19:08 2014<br>
New Revision: 198655<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=198655&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=198655&view=rev</a><br>
Log:<br>
Implement a new -fstandalone-debug option. rdar://problem/15685848<br>
It controls everything that -flimit-debug-info used to, plus the<br>
vtable type optimization. The old -fno-limit-debug-info option is now an<br>
alias to -fstandalone-debug and vice versa.<br>
<br>
Standalone is the default on Darwin until dtrace is updated to work with<br>
non-standalone debug info (rdar://problem/15758808).<br>
<br>
Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind<br>
because NoStandaloneDebugInfo sounded even more confusing.<br>
<br>
Added:<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-vtable-optzn.cpp<br>
Modified:<br>
    cfe/trunk/docs/tools/clang.pod<br>
    cfe/trunk/include/clang/<u></u>Driver/Options.td<br>
    cfe/trunk/include/clang/<u></u>Frontend/CodeGenOptions.h<br>
    cfe/trunk/lib/CodeGen/<u></u>CGDebugInfo.cpp<br>
    cfe/trunk/lib/Driver/Tools.cpp<br>
    cfe/trunk/lib/Frontend/<u></u>CompilerInvocation.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-limited.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-nolimit.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-dup-fwd-decl.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-method2.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-namespace.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-pubtypes.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-limit.cpp<br>
    cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-member.cpp<br>
<br>
Modified: cfe/trunk/docs/tools/clang.pod<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/tools/clang.pod?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/docs/tools/<u></u>clang.pod?rev=198655&r1=<u></u>198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/docs/tools/clang.pod (original)<br>
+++ cfe/trunk/docs/tools/clang.pod Mon Jan  6 19:19:08 2014<br>
@@ -312,12 +312,19 @@ Currently equivalent to B<-O3><br>
 Generate debug information.  Note that Clang debug information works best at<br>
 B<-O0>.<br>
<br>
-=item B<-flimit-debug-info> B<-fno-limit-debug-info><br>
+=item B<-fstandalone-debug> B<-fno-standalone-debug><br>
<br>
-By default Clang does not emit type definitions for types that are not<br>
-needed by the module and could be replaced with a forward<br>
-declaration. By specifying B<-fno-limit-debug-info> this optimization<br>
-can be turned off. Note that Clang will never emit type information<br>
+Clang supports a number of optimizations to reduce the size of debug<br>
+information in the binary. They work based on the assumption that the<br>
+debug type information can be spread out over multiple compilation<br>
+units.  For instance, Clang will not emit type definitions for types<br>
+that are not needed by a module and could be replaced with a forward<br>
+declaration.  Further, Clang will only emit type info for a dynamic<br>
+C++ class in the module that contains the vtable for the class.<br>
+<br>
+The B<-fstandalone-debug> option turns off these optimizations.  This<br>
+is useful when working with 3rd-party libraries that don't come with<br>
+debug information.  Note that Clang will never emit type information<br>
 for types that are not referenced at all by the program.<br>
<br>
 =item B<-fexceptions><br>
<br>
Modified: cfe/trunk/include/clang/<u></u>Driver/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/include/<u></u>clang/Driver/Options.td?rev=<u></u>198655&r1=198654&r2=198655&<u></u>view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/include/clang/<u></u>Driver/Options.td (original)<br>
+++ cfe/trunk/include/clang/<u></u>Driver/Options.td Mon Jan  6 19:19:08 2014<br>
@@ -559,8 +559,6 @@ def finstrument_functions : Flag<["-"],<br>
 def fkeep_inline_functions : Flag<["-"], "fkeep-inline-functions">, Group<clang_ignored_f_Group>;<br>
 def flat__namespace : Flag<["-"], "flat_namespace">;<br>
 def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>;<br>
-def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Group<f_Group>, Flags<[CC1Option]>,<br>
-  HelpText<"Limit debug information produced to reduce size of debug binary">;<br>
 def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>;<br>
 def flto : Flag<["-"], "flto">, Group<f_Group>;<br>
 def fno_lto : Flag<["-"], "fno-lto">, Group<f_Group>;<br>
@@ -654,8 +652,6 @@ def fno_inline : Flag<["-"], "fno-inline<br>
 def fno_keep_inline_functions : Flag<["-"], "fno-keep-inline-functions">, Group<clang_ignored_f_Group>;<br>
 def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,<br>
   HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>;<br>
-def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Group<f_Group>, Flags<[CC1Option]>,<br>
-  HelpText<"Do not limit debug information produced to reduce size of debug binary">;<br>
 def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>,<br>
     Flags<[CC1Option]>, HelpText<"Disallow merging of constants">;<br>
 def fno_modules : Flag <["-"], "fno-modules">, Group<f_Group>,<br>
@@ -783,6 +779,12 @@ def fno_signed_char : Flag<["-"], "fno-s<br>
 def fsplit_stack : Flag<["-"], "fsplit-stack">, Group<f_Group>;<br>
 def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>;<br>
 def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>;<br>
+def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CC1Option]>,<br>
+  HelpText<"Emit full debug info for all types used by the program">;<br>
+def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CC1Option]>,<br>
+  HelpText<"Limit debug information produced to reduce size of debug binary">;<br>
+def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Alias<fno_standalone_debug>;<br>
+def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Alias<fstandalone_debug>;<br>
 def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>;<br>
 def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>,<br>
   HelpText<"Enable optimizations based on the strict definition of an enum's "<br>
<br>
Modified: cfe/trunk/include/clang/<u></u>Frontend/CodeGenOptions.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/include/<u></u>clang/Frontend/CodeGenOptions.<u></u>h?rev=198655&r1=198654&r2=<u></u>198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/include/clang/<u></u>Frontend/CodeGenOptions.h (original)<br>
+++ cfe/trunk/include/clang/<u></u>Frontend/CodeGenOptions.h Mon Jan  6 19:19:08 2014<br>
@@ -50,12 +50,20 @@ public:<br>
   };<br>
<br>
   enum DebugInfoKind {<br>
-    NoDebugInfo,          // Don't generate debug info.<br>
-    DebugLineTablesOnly,  // Emit only debug info necessary for generating<br>
-                          // line number tables (-gline-tables-only).<br>
-    LimitedDebugInfo,     // Limit generated debug info to reduce size<br>
-                          // (-flimit-debug-info).<br>
-    FullDebugInfo         // Generate complete debug info.<br>
+    NoDebugInfo,          /// Don't generate debug info.<br>
+<br>
+    DebugLineTablesOnly,  /// Emit only debug info necessary for generating<br>
+                          /// line number tables (-gline-tables-only).<br>
+<br>
+    LimitedDebugInfo,     /// Limit generated debug info to reduce size<br>
+                          /// (-fno-standalone-debug). </blockquote><div><br></div><div>Probably useful for this comment to describe the principle used here, then, optionally, list the current applications of that principle. (eg: "LimitedDebugInfo": Emit declarations for types known to have their definitions emitted in other translation units.)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This emits<br>
+                          /// forward decls for types that could be<br>
+                          /// replaced with forward decls in the source<br>
+                          /// code. For dynamic C++ classes type info<br>
+                          /// is only emitted int the module that<br>
+                          /// contains the classe's vtable.<br>
+<br>
+    FullDebugInfo         /// Generate complete debug info.<br>
   };<br>
<br>
   enum TLSModel {<br>
<br>
Modified: cfe/trunk/lib/CodeGen/<u></u>CGDebugInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/lib/CodeGen/<u></u>CGDebugInfo.cpp?rev=198655&r1=<u></u>198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/lib/CodeGen/<u></u>CGDebugInfo.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/<u></u>CGDebugInfo.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1464,13 +1464,13 @@ llvm::DIType CGDebugInfo::CreateType(con<br>
   // declaration. The completeType, completeRequiredType, and completeClassData<br>
   // callbacks will handle promoting the declaration to a definition.<br>
   if (T ||<br>
+      // Under -flimit-debug-info:<br>
       (DebugKind <= CodeGenOptions::<u></u>LimitedDebugInfo &&<br>
-       // Under -flimit-debug-info, emit only a declaration unless the type is<br>
-       // required to be complete.<br>
-       !RD-><u></u>isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) ||<br>
-      // If the class is dynamic, only emit a declaration. A definition will be<br>
-      // emitted whenever the vtable is emitted.<br>
-      (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass())) {<br>
+       // Emit only a forward declaration unless the type is required.<br>
+       ((!RD-><u></u>isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) ||<br>
+        // If the class is dynamic, only emit a declaration. A definition will be<br>
+        // emitted whenever the vtable is emitted.<br>
+        (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass())))) {<br>
     llvm::DIDescriptor FDContext =<br>
       getContextDescriptor(cast<<u></u>Decl>(RD->getDeclContext()));<br>
     if (!T)<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/lib/Driver/<u></u>Tools.cpp?rev=198655&r1=<u></u>198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Jan  6 19:19:08 2014<br>
@@ -2945,8 +2945,8 @@ void Clang::ConstructJob(<u></u>Compilation &C,<br>
   // Forward -f (flag) options which we can pass directly.<br>
   Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls);<br>
   Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_<u></u>extensions);<br>
-  Args.AddLastArg(CmdArgs, options::OPT_flimit_debug_<u></u>info);<br>
-  Args.AddLastArg(CmdArgs, options::OPT_fno_limit_debug_<u></u>info);<br>
+  Args.AddLastArg(CmdArgs, options::OPT_fstandalone_<u></u>debug);<br>
+  Args.AddLastArg(CmdArgs, options::OPT_fno_standalone_<u></u>debug);<br>
   Args.AddLastArg(CmdArgs, options::OPT_fno_operator_<u></u>names);<br>
   // AltiVec language extensions aren't relevant for assembling.<br>
   if (!isa<PreprocessJobAction>(JA) ||<br>
<br>
Modified: cfe/trunk/lib/Frontend/<u></u>CompilerInvocation.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/lib/<u></u>Frontend/CompilerInvocation.<u></u>cpp?rev=198655&r1=198654&r2=<u></u>198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/lib/Frontend/<u></u>CompilerInvocation.cpp (original)<br>
+++ cfe/trunk/lib/Frontend/<u></u>CompilerInvocation.cpp Mon Jan  6 19:19:08 2014<br>
@@ -296,7 +296,8 @@ static void ParseCommentArgs(CommentOpti<br>
 }<br>
<br>
 static bool ParseCodeGenArgs(<u></u>CodeGenOptions &Opts, ArgList &Args, InputKind IK,<br>
-                             DiagnosticsEngine &Diags) {<br>
+                             DiagnosticsEngine &Diags,<br>
+                             const TargetOptions &TargetOpts) {<br>
   using namespace options;<br>
   bool Success = true;<br>
<br>
@@ -323,10 +324,16 @@ static bool ParseCodeGenArgs(CodeGenOpti<br>
     Opts.setDebugInfo(<u></u>CodeGenOptions::<u></u>DebugLineTablesOnly);<br>
   } else if (Args.hasArg(OPT_g_Flag) || Args.hasArg(OPT_gdwarf_2) ||<br>
              Args.hasArg(OPT_gdwarf_3) || Args.hasArg(OPT_gdwarf_4)) {<br>
-    if (Args.hasFlag(OPT_flimit_<u></u>debug_info, OPT_fno_limit_debug_info, true))<br>
-      Opts.setDebugInfo(<u></u>CodeGenOptions::<u></u>LimitedDebugInfo);<br>
-    else<br>
+    bool Default = false;<br>
+    // Until dtrace (via CTF) can deal with distributed debug info,<br>
+    // Darwin defaults to standalone/full debug info.<br>
+    if (llvm::Triple(TargetOpts.<u></u>Triple).isOSDarwin())<br>
+      Default = true;<br>
+<br>
+    if (Args.hasFlag(OPT_fstandalone_<u></u>debug, OPT_fno_standalone_debug, Default))<br>
       Opts.setDebugInfo(<u></u>CodeGenOptions::FullDebugInfo)<u></u>;<br>
+    else<br>
+      Opts.setDebugInfo(<u></u>CodeGenOptions::<u></u>LimitedDebugInfo);<br>
   }<br>
   Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_<u></u>info);<br>
   Opts.SplitDwarfFile = Args.getLastArgValue(OPT_<u></u>split_dwarf_file);<br>
@@ -1662,8 +1669,9 @@ bool CompilerInvocation::<u></u>CreateFromArgs(<br>
   ParseFileSystemArgs(Res.<u></u>getFileSystemOpts(), *Args);<br>
   // FIXME: We shouldn't have to pass the DashX option around here<br>
   InputKind DashX = ParseFrontendArgs(Res.<u></u>getFrontendOpts(), *Args, Diags);<br>
-  Success = ParseCodeGenArgs(Res.<u></u>getCodeGenOpts(), *Args, DashX, Diags)<br>
-            && Success;<br>
+  ParseTargetArgs(Res.<u></u>getTargetOpts(), *Args);<br>
+  Success = ParseCodeGenArgs(Res.<u></u>getCodeGenOpts(), *Args, DashX, Diags,<br>
+                             Res.getTargetOpts()) && Success;<br>
   ParseHeaderSearchArgs(Res.<u></u>getHeaderSearchOpts(), *Args);<br>
   if (DashX != IK_AST && DashX != IK_LLVM_IR) {<br>
     ParseLangArgs(*Res.<u></u>getLangOpts(), *Args, DashX, Diags);<br>
@@ -1678,8 +1686,6 @@ bool CompilerInvocation::<u></u>CreateFromArgs(<br>
   ParsePreprocessorArgs(Res.<u></u>getPreprocessorOpts(), *Args, FileMgr, Diags);<br>
   ParsePreprocessorOutputArgs(<u></u>Res.getPreprocessorOutputOpts(<u></u>), *Args,<br>
                               Res.getFrontendOpts().<u></u>ProgramAction);<br>
-  ParseTargetArgs(Res.<u></u>getTargetOpts(), *Args);<br>
-<br>
   return Success;<br>
 }<br>
<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-limited.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-class-limited.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-class-<u></u>limited.cpp?rev=198655&r1=<u></u>198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-limited.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-limited.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s<br>
+// RUN: %clang -emit-llvm -fno-standalone-debug -g -S %s -o - | FileCheck %s<br>
<br>
 namespace PR16214_1 {<br>
 // CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-nolimit.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-class-nolimit.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-class-<u></u>nolimit.cpp?rev=198655&r1=<u></u>198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-nolimit.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-class-nolimit.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,4 +1,6 @@<br>
-// RUN: %clang_cc1 -triple x86_64-unk-unk -fno-limit-debug-info -o - -emit-llvm -g %s | FileCheck %s<br>
+// RUN: %clang_cc1 -triple x86_64-unk-unk -fstandalone-debug -o - -emit-llvm -g %s | FileCheck %s<br>
+// On Darwin, this should be the default:<br>
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -o - -emit-llvm -g %s | FileCheck %s<br>
<br>
 namespace rdar14101097_1 { // see also PR16214<br>
 // Check that we emit debug info for the definition of a struct if the<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-dup-fwd-decl.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-dup-fwd-<u></u>decl.cpp?rev=198655&r1=198654&<u></u>r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-dup-fwd-decl.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-dup-fwd-decl.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -fno-limit-debug-info %s -o - | FileCheck %s<br>
+// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -fstandalone-debug %s -o - | FileCheck %s<br>
<br>
 class Test<br>
 {<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-method2.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-method2.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-method2.<u></u>cpp?rev=198655&r1=198654&r2=<u></u>198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-method2.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-method2.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -flimit-debug-info -x c++ -g -S -emit-llvm < %s | FileCheck %s<br>
+// RUN: %clang_cc1 -fno-standalone-debug -x c++ -g -S -emit-llvm < %s | FileCheck %s<br>
 // rdar://10336845<br>
 // Preserve type qualifiers in -flimit-debug-info mode.<br>
<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-namespace.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-<u></u>namespace.cpp?rev=198655&r1=<u></u>198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-namespace.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-namespace.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,6 +1,6 @@<br>
-// RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s<br>
-// RUN: %clang -g -gline-tables-only -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s<br>
-// RUN: %clang -g -fno-limit-debug-info -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s<br>
+// RUN: %clang -g -fno-standalone-debug -S -emit-llvm %s -o - | FileCheck %s<br>
+// RUN: %clang -g -gline-tables-only    -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s<br>
+// RUN: %clang -g -fstandalone-debug    -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s<br>
<br>
 namespace A {<br>
 #line 1 "foo.cpp"<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-pubtypes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-pubtypes.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-<u></u>pubtypes.cpp?rev=198655&r1=<u></u>198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-pubtypes.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-pubtypes.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,5 +1,5 @@<br>
 // REQUIRES: x86-registered-target<br>
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10  -g -fno-limit-debug-info -S -mllvm -generate-dwarf-pub-sections=<u></u>Enable %s -o - | FileCheck %s<br>
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10  -g -fstandalone-debug -S -mllvm -generate-dwarf-pub-sections=<u></u>Enable %s -o - | FileCheck %s<br>
<br>
 // FIXME: This testcase shouldn't rely on assembly emission.<br>
 //CHECK: Lpubtypes_begin[[SECNUM:[0-9]:<u></u>]]<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-limit.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-limit.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-<u></u>template-limit.cpp?rev=198655&<u></u>r1=198654&r2=198655&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-limit.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-limit.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -emit-llvm -flimit-debug-info -cxx-abi itanium -g %s -o - | FileCheck %s<br>
+// RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -cxx-abi itanium -g %s -o - | FileCheck %s<br>
<br>
 // Check that this pointer type is TC<int><br>
 // CHECK: ![[LINE:[0-9]+]] = {{.*}}"TC<int>", {{.*}} metadata !"_ZTS2TCIiE"} ; [ DW_TAG_class_type ]<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-member.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-member.cpp?rev=198655&r1=198654&r2=198655&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-<u></u>template-member.cpp?rev=<u></u>198655&r1=198654&r2=198655&<u></u>view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-member.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-template-member.cpp Mon Jan  6 19:19:08 2014<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s<br>
+// RUN: %clang_cc1 -emit-llvm -g -fno-standalone-debug -triple x86_64-apple-darwin %s -o - | FileCheck %s<br>
<br>
 struct MyClass {<br>
   template <int i> int add(int j) {<br>
<br>
Added: cfe/trunk/test/CodeGenCXX/<u></u>debug-info-vtable-optzn.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp?rev=198655&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CodeGenCXX/debug-info-vtable-<u></u>optzn.cpp?rev=198655&view=auto</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- cfe/trunk/test/CodeGenCXX/<u></u>debug-info-vtable-optzn.cpp (added)<br>
+++ cfe/trunk/test/CodeGenCXX/<u></u>debug-info-vtable-optzn.cpp Mon Jan  6 19:19:08 2014<br>
@@ -0,0 +1,21 @@<br>
+// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s<br>
+//<br>
+// This tests that the "emit debug info for a C++ class only in the<br>
+// module that has its vtable" optimization is disabled by default on<br>
+// Darwin.<br>
+//<br>
+// CHECK: [ DW_TAG_member ] [lost]<br>
+class A<br>
+{<br>
+  virtual bool f() = 0;<br>
+  int lost;<br>
+};<br>
+<br>
+class B : public A<br>
+{<br>
+  B *g();<br>
+};<br>
+<br>
+B *B::g() {<br>
+  return this;<br>
+}<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-commits</a><br>
</blockquote>