r249655 - Stop messing with the 'g' group of options in CompilerInvocation.

Douglas Katzman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 21:24:16 PDT 2015


Author: dougk
Date: Wed Oct  7 23:24:12 2015
New Revision: 249655

URL: http://llvm.org/viewvc/llvm-project?rev=249655&view=rev
Log:
Stop messing with the 'g' group of options in CompilerInvocation.

With this change, most 'g' options are rejected by CompilerInvocation.
They remain only as Driver options. The new way to request debug info
from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}"
and "-dwarf-version={2|3|4}". In the absence of a command-line option
to specify Dwarf version, the Toolchain decides it, rather than placing
Toolchain-specific logic in CompilerInvocation.

Also fix a bug in the Windows compatibility argument parsing
in which the "rightmost argument wins" principle failed.

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

Modified:
    cfe/trunk/include/clang/Driver/CC1Options.td
    cfe/trunk/include/clang/Driver/Options.td
    cfe/trunk/include/clang/Driver/ToolChain.h
    cfe/trunk/lib/Driver/ToolChains.h
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/lib/Driver/Tools.h
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/test/CodeGen/2006-01-13-Includes.c
    cfe/trunk/test/CodeGen/2007-05-11-str-const.c
    cfe/trunk/test/CodeGen/2009-01-21-InvalidIterator.c
    cfe/trunk/test/CodeGen/2009-03-13-dbg.c
    cfe/trunk/test/CodeGen/2009-04-23-dbg.c
    cfe/trunk/test/CodeGen/2009-07-31-DbgDeclare.c
    cfe/trunk/test/CodeGen/2010-01-14-FnType-DebugInfo.c
    cfe/trunk/test/CodeGen/2010-01-18-Inlined-Debug.c
    cfe/trunk/test/CodeGen/2010-02-10-PointerName.c
    cfe/trunk/test/CodeGen/2010-02-15-DbgStaticVar.c
    cfe/trunk/test/CodeGen/2010-02-16-DbgScopes.c
    cfe/trunk/test/CodeGen/2010-03-5-LexicalScope.c
    cfe/trunk/test/CodeGen/2010-07-08-DeclDebugLineNo.c
    cfe/trunk/test/CodeGen/2010-08-10-DbgConstant.c
    cfe/trunk/test/CodeGen/attr-nodebug.c
    cfe/trunk/test/CodeGen/attr-noinline.c
    cfe/trunk/test/CodeGen/cleanup-destslot-simple.c
    cfe/trunk/test/CodeGen/debug-info-257-args.c
    cfe/trunk/test/CodeGen/debug-info-args.c
    cfe/trunk/test/CodeGen/debug-info-block-decl.c
    cfe/trunk/test/CodeGen/debug-info-block-out-return.c
    cfe/trunk/test/CodeGen/debug-info-block.c
    cfe/trunk/test/CodeGen/debug-info-compilation-dir.c
    cfe/trunk/test/CodeGen/debug-info-crash.c
    cfe/trunk/test/CodeGen/debug-info-enum.c
    cfe/trunk/test/CodeGen/debug-info-gline-tables-only.c
    cfe/trunk/test/CodeGen/debug-info-gline-tables-only2.c
    cfe/trunk/test/CodeGen/debug-info-line.c
    cfe/trunk/test/CodeGen/debug-info-line2.c
    cfe/trunk/test/CodeGen/debug-info-line3.c
    cfe/trunk/test/CodeGen/debug-info-member.c
    cfe/trunk/test/CodeGen/debug-info-packed-struct.c
    cfe/trunk/test/CodeGen/debug-info-same-line.c
    cfe/trunk/test/CodeGen/debug-info-scope-file.c
    cfe/trunk/test/CodeGen/debug-info-scope.c
    cfe/trunk/test/CodeGen/debug-info-static.c
    cfe/trunk/test/CodeGen/debug-info-typedef.c
    cfe/trunk/test/CodeGen/debug-info-vector.c
    cfe/trunk/test/CodeGen/debug-info-vla.c
    cfe/trunk/test/CodeGen/debug-info.c
    cfe/trunk/test/CodeGen/debug-line-1.c
    cfe/trunk/test/CodeGen/enum2.c
    cfe/trunk/test/CodeGen/global-blocks-lines.c
    cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c
    cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c
    cfe/trunk/test/CodeGen/lineno-dbginfo.c
    cfe/trunk/test/CodeGen/linetable-endscope.c
    cfe/trunk/test/CodeGen/sse-builtins-dbg.c
    cfe/trunk/test/CodeGen/vector.c
    cfe/trunk/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp
    cfe/trunk/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp
    cfe/trunk/test/CodeGenCXX/2009-03-17-dbg.cpp
    cfe/trunk/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp
    cfe/trunk/test/CodeGenCXX/2010-03-09-AnonAggregate.cpp
    cfe/trunk/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp
    cfe/trunk/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp
    cfe/trunk/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp
    cfe/trunk/test/CodeGenCXX/2010-06-22-BitfieldInit.cpp
    cfe/trunk/test/CodeGenCXX/2010-06-22-ZeroBitfield.cpp
    cfe/trunk/test/CodeGenCXX/2010-07-23-DeclLoc.cpp
    cfe/trunk/test/CodeGenCXX/PR20038.cpp
    cfe/trunk/test/CodeGenCXX/cp-blocks-linetables.cpp
    cfe/trunk/test/CodeGenCXX/crash.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-access.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-anon-union-vars.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-artificial-arg.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-blocks.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-char16.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-class-nolimit.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-context.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-cxx0x.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-cxx1y.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-decl-nested.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-determinism.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-enum-class.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-flex-member.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-function-context.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-fwd-ref.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-gline-tables-only.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-global.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-large-constant.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-line-if.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-line.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-method-nodebug.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-method.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-method2.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-nullptr.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-qualifiers.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-rvalue-ref.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-scope.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-static-fns.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-template-fwd.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-template-limit.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-template-member.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-template-partial-specialization.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-template-quals.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-template-recursive.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-thunk.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-union-template.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-union.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-use-after-free.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-uuid.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-wchar.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-windows-dtor.cpp
    cfe/trunk/test/CodeGenCXX/debug-info.cpp
    cfe/trunk/test/CodeGenCXX/debug-lambda-expressions.cpp
    cfe/trunk/test/CodeGenCXX/debug-lambda-this.cpp
    cfe/trunk/test/CodeGenCXX/destructor-debug-info.cpp
    cfe/trunk/test/CodeGenCXX/globalinit-loc.cpp
    cfe/trunk/test/CodeGenCXX/inline-dllexport-member.cpp
    cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp
    cfe/trunk/test/CodeGenCXX/linetable-eh.cpp
    cfe/trunk/test/CodeGenCXX/linetable-fnbegin.cpp
    cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp
    cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp
    cfe/trunk/test/CodeGenCXX/scoped-enums-debug-info.cpp
    cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp
    cfe/trunk/test/CodeGenObjC/2009-01-21-invalid-debug-info.m
    cfe/trunk/test/CodeGenObjC/2010-02-09-DbgSelf.m
    cfe/trunk/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m
    cfe/trunk/test/CodeGenObjC/2010-02-23-DbgInheritance.m
    cfe/trunk/test/CodeGenObjC/arc-linetable-autorelease.m
    cfe/trunk/test/CodeGenObjC/arc-linetable.m
    cfe/trunk/test/CodeGenObjC/block-byref-debuginfo.m
    cfe/trunk/test/CodeGenObjC/blocks-ivar-debug.m
    cfe/trunk/test/CodeGenObjC/catch-lexical-block.m
    cfe/trunk/test/CodeGenObjC/debug-info-block-captured-self.m
    cfe/trunk/test/CodeGenObjC/debug-info-block-helper.m
    cfe/trunk/test/CodeGenObjC/debug-info-block-line.m
    cfe/trunk/test/CodeGenObjC/debug-info-block-type.m
    cfe/trunk/test/CodeGenObjC/debug-info-blocks.m
    cfe/trunk/test/CodeGenObjC/debug-info-class-extension.m
    cfe/trunk/test/CodeGenObjC/debug-info-class-extension2.m
    cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m
    cfe/trunk/test/CodeGenObjC/debug-info-crash-2.m
    cfe/trunk/test/CodeGenObjC/debug-info-crash.m
    cfe/trunk/test/CodeGenObjC/debug-info-default-synth-ivar.m
    cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m
    cfe/trunk/test/CodeGenObjC/debug-info-id-with-protocol.m
    cfe/trunk/test/CodeGenObjC/debug-info-impl.m
    cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m
    cfe/trunk/test/CodeGenObjC/debug-info-ivars-extension.m
    cfe/trunk/test/CodeGenObjC/debug-info-ivars-indirect.m
    cfe/trunk/test/CodeGenObjC/debug-info-ivars-private.m
    cfe/trunk/test/CodeGenObjC/debug-info-ivars.m
    cfe/trunk/test/CodeGenObjC/debug-info-lifetime-crash.m
    cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m
    cfe/trunk/test/CodeGenObjC/debug-info-nested-blocks.m
    cfe/trunk/test/CodeGenObjC/debug-info-property-accessors.m
    cfe/trunk/test/CodeGenObjC/debug-info-property.m
    cfe/trunk/test/CodeGenObjC/debug-info-property2.m
    cfe/trunk/test/CodeGenObjC/debug-info-property3.m
    cfe/trunk/test/CodeGenObjC/debug-info-property4.m
    cfe/trunk/test/CodeGenObjC/debug-info-property5.m
    cfe/trunk/test/CodeGenObjC/debug-info-pubtypes.m
    cfe/trunk/test/CodeGenObjC/debug-info-selector.m
    cfe/trunk/test/CodeGenObjC/debug-info-self.m
    cfe/trunk/test/CodeGenObjC/debug-info-static-var.m
    cfe/trunk/test/CodeGenObjC/debug-info-synthesis.m
    cfe/trunk/test/CodeGenObjC/debug-info-variadic-method.m
    cfe/trunk/test/CodeGenObjC/debug-property-synth.m
    cfe/trunk/test/CodeGenObjC/debuginfo-properties.m
    cfe/trunk/test/CodeGenObjC/layout-bitfield-crash.m
    cfe/trunk/test/CodeGenObjC/objc-fixed-enum.m
    cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m
    cfe/trunk/test/CodeGenObjC/property-dbg.m
    cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm
    cfe/trunk/test/CodeGenObjCXX/debug-info-line.mm
    cfe/trunk/test/CodeGenObjCXX/debug-info.mm
    cfe/trunk/test/CodeGenObjCXX/nested-ehlocation.mm
    cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm
    cfe/trunk/test/CodeGenObjCXX/property-objects.mm
    cfe/trunk/test/Coverage/codegen-next.m
    cfe/trunk/test/Coverage/codegen.c
    cfe/trunk/test/Coverage/targets.c
    cfe/trunk/test/Driver/cl-options.c
    cfe/trunk/test/Driver/clang-g-opts.c
    cfe/trunk/test/Driver/debug-options-as.c
    cfe/trunk/test/Driver/debug-options.c
    cfe/trunk/test/Driver/integrated-as.s
    cfe/trunk/test/Driver/split-debug.c
    cfe/trunk/test/Frontend/optimization-remark-line-directive.c
    cfe/trunk/test/Frontend/optimization-remark.c
    cfe/trunk/test/Misc/backend-optimization-failure.cpp
    cfe/trunk/test/Modules/DebugInfoSubmoduleImport.c
    cfe/trunk/test/Modules/DebugInfoSubmodules.c
    cfe/trunk/test/Modules/DebugInfoTransitiveImport.m
    cfe/trunk/test/Modules/ExtDebugInfo.cpp
    cfe/trunk/test/Modules/ExtDebugInfo.m
    cfe/trunk/test/Modules/ModuleDebugInfo.cpp
    cfe/trunk/test/Modules/cxx-irgen.cpp
    cfe/trunk/test/Modules/debug-info-moduleimport.m
    cfe/trunk/test/OpenMP/atomic_codegen.cpp
    cfe/trunk/test/OpenMP/critical_codegen.cpp
    cfe/trunk/test/OpenMP/flush_codegen.cpp
    cfe/trunk/test/OpenMP/for_codegen.cpp
    cfe/trunk/test/OpenMP/for_simd_codegen.cpp
    cfe/trunk/test/OpenMP/master_codegen.cpp
    cfe/trunk/test/OpenMP/parallel_codegen.cpp
    cfe/trunk/test/OpenMP/parallel_for_codegen.cpp
    cfe/trunk/test/OpenMP/parallel_for_simd_codegen.cpp
    cfe/trunk/test/OpenMP/simd_codegen.cpp
    cfe/trunk/test/OpenMP/single_codegen.cpp
    cfe/trunk/test/OpenMP/taskgroup_codegen.cpp
    cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
    cfe/trunk/test/PCH/debug-info-limited-struct.c
    cfe/trunk/test/PCH/pending-ids.m
    cfe/trunk/test/Rewriter/line-generation-test.m
    cfe/trunk/test/VFS/external-names.c
    cfe/trunk/tools/driver/cc1as_main.cpp

Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Wed Oct  7 23:24:12 2015
@@ -132,6 +132,8 @@ def migrator_no_finalize_removal : Flag<
 
 let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
 
+def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
+def dwarf_version_EQ : Joined<["-"], "dwarf-version=">;
 def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
   HelpText<"The compilation directory to embed in the debug info.">;
 def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Wed Oct  7 23:24:12 2015
@@ -989,9 +989,9 @@ def fstack_protector_strong : Flag<["-"]
   HelpText<"Use a strong heuristic to apply stack protectors to functions">;
 def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>,
   HelpText<"Enable stack protectors for functions potentially vulnerable to stack smashing">;
-def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CC1Option]>,
+def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>,
   HelpText<"Emit full debug info for all types used by the program">;
-def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CC1Option]>,
+def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>,
   HelpText<"Limit debug information produced to reduce size of debug binary">;
 def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Alias<fno_standalone_debug>;
 def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Alias<fstandalone_debug>;
@@ -1108,9 +1108,9 @@ def fdebug_types_section: Flag <["-"], "
 def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>,
   Flags<[CC1Option]>;
 def g_Flag : Flag<["-"], "g">, Group<g_Group>,
-  HelpText<"Generate source-level debug information">, Flags<[CC1Option,CC1AsOption]>;
+  HelpText<"Generate source-level debug information">;
 def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<g_Group>,
-  HelpText<"Emit debug line number tables only">, Flags<[CC1Option]>;
+  HelpText<"Emit debug line number tables only">;
 def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>;
 def g0 : Flag<["-"], "g0">, Group<g_Group>;
 def g1 : Flag<["-"], "g1">, Group<g_Group>, Alias<gline_tables_only>;
@@ -1124,11 +1124,11 @@ def ggdb1 : Flag<["-"], "ggdb1">, Alias<
 def ggdb2 : Flag<["-"], "ggdb2">, Alias<g2>;
 def ggdb3 : Flag<["-"], "ggdb3">, Alias<g3>;
 def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>,
-  HelpText<"Generate source-level debug information with dwarf version 2">, Flags<[CC1Option,CC1AsOption]>;
+  HelpText<"Generate source-level debug information with dwarf version 2">;
 def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>,
-  HelpText<"Generate source-level debug information with dwarf version 3">, Flags<[CC1Option,CC1AsOption]>;
+  HelpText<"Generate source-level debug information with dwarf version 3">;
 def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>,
-  HelpText<"Generate source-level debug information with dwarf version 4">, Flags<[CC1Option,CC1AsOption]>;
+  HelpText<"Generate source-level debug information with dwarf version 4">;
 def gcodeview : Flag<["-"], "gcodeview">,
   HelpText<"Generate CodeView debug information">,
   Flags<[CC1Option, CC1AsOption, CoreOption]>;

Modified: cfe/trunk/include/clang/Driver/ToolChain.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ToolChain.h?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/ToolChain.h (original)
+++ cfe/trunk/include/clang/Driver/ToolChain.h Wed Oct  7 23:24:12 2015
@@ -287,6 +287,16 @@ public:
   /// compile unit information.
   virtual bool UseDwarfDebugFlags() const { return false; }
 
+  // Return the DWARF version to emit, in the absence of arguments
+  // to the contrary.
+  virtual unsigned GetDefaultDwarfVersion() const { return 4; }
+
+  // True if the driver should assume "-fstandalone-debug"
+  // in the absence of an option specifying otherwise,
+  // provided that debugging was requested in the first place.
+  // i.e. a value of 'true' does not imply that debugging is wanted.
+  virtual bool GetDefaultStandaloneDebug() const { return false; }
+
   /// UseSjLjExceptions - Does this tool chain use SjLj exceptions.
   virtual bool UseSjLjExceptions() const { return false; }
 

Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Wed Oct  7 23:24:12 2015
@@ -508,6 +508,12 @@ public:
 
   void AddLinkARCArgs(const llvm::opt::ArgList &Args,
                       llvm::opt::ArgStringList &CmdArgs) const override;
+
+  unsigned GetDefaultDwarfVersion() const override { return 2; }
+  // Until dtrace (via CTF) and LLDB can deal with distributed debug info,
+  // Darwin defaults to standalone/full debug info.
+  bool GetDefaultStandaloneDebug() const override { return true; }
+
   /// }
 
 private:
@@ -564,6 +570,8 @@ public:
       const llvm::opt::ArgList &DriverArgs,
       llvm::opt::ArgStringList &CC1Args) const override;
 
+  unsigned GetDefaultDwarfVersion() const override { return 2; }
+
 protected:
   Tool *buildAssembler() const override;
   Tool *buildLinker() const override;
@@ -615,6 +623,7 @@ public:
   unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
     return 2;
   }
+  unsigned GetDefaultDwarfVersion() const override { return 2; }
 
 protected:
   Tool *buildAssembler() const override;
@@ -661,6 +670,10 @@ public:
   bool UseSjLjExceptions() const override;
   bool isPIEDefault() const override;
   SanitizerMask getSupportedSanitizers() const override;
+  unsigned GetDefaultDwarfVersion() const override { return 2; }
+  // Until dtrace (via CTF) and LLDB can deal with distributed debug info,
+  // FreeBSD defaults to standalone/full debug info.
+  bool GetDefaultStandaloneDebug() const override { return true; }
 
 protected:
   Tool *buildAssembler() const override;

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Oct  7 23:24:12 2015
@@ -2324,6 +2324,38 @@ static bool UseRelaxAll(Compilation &C,
                       RelaxDefault);
 }
 
+// Extract the integer N from a string spelled "-dwarf-N", returning 0
+// on mismatch. The StringRef input (rather than an Arg) allows
+// for use by the "-Xassembler" option parser.
+static unsigned DwarfVersionNum(StringRef ArgValue) {
+  return llvm::StringSwitch<unsigned>(ArgValue)
+      .Case("-gdwarf-2", 2)
+      .Case("-gdwarf-3", 3)
+      .Case("-gdwarf-4", 4)
+      .Default(0);
+}
+
+static void RenderDebugEnablingArgs(const ArgList &Args, ArgStringList &CmdArgs,
+                                    CodeGenOptions::DebugInfoKind DebugInfoKind,
+                                    unsigned DwarfVersion) {
+  switch (DebugInfoKind) {
+  case CodeGenOptions::DebugLineTablesOnly:
+    CmdArgs.push_back("-debug-info-kind=line-tables-only");
+    break;
+  case CodeGenOptions::LimitedDebugInfo:
+    CmdArgs.push_back("-debug-info-kind=limited");
+    break;
+  case CodeGenOptions::FullDebugInfo:
+    CmdArgs.push_back("-debug-info-kind=standalone");
+    break;
+  default:
+    break;
+  }
+  if (DwarfVersion > 0)
+    CmdArgs.push_back(
+        Args.MakeArgString("-dwarf-version=" + std::to_string(DwarfVersion)));
+}
+
 static void CollectArgsForIntegratedAssembler(Compilation &C,
                                               const ArgList &Args,
                                               ArgStringList &CmdArgs,
@@ -2373,7 +2405,14 @@ static void CollectArgsForIntegratedAsse
         if (Value == "-I")
           TakeNextArg = true;
       } else if (Value.startswith("-gdwarf-")) {
-        CmdArgs.push_back(Value.data());
+        // "-gdwarf-N" options are not cc1as options.
+        unsigned DwarfVersion = DwarfVersionNum(Value);
+        if (DwarfVersion == 0) { // Send it onward, and let cc1as complain.
+          CmdArgs.push_back(Value.data());
+        } else {
+          RenderDebugEnablingArgs(
+              Args, CmdArgs, CodeGenOptions::LimitedDebugInfo, DwarfVersion);
+        }
       } else if (Value.startswith("-mcpu") || Value.startswith("-mfpu") ||
                  Value.startswith("-mhwdiv") || Value.startswith("-march")) {
         // Do nothing, we'll validate it later.
@@ -3710,9 +3749,23 @@ void Clang::ConstructJob(Compilation &C,
     break;
   }
 
+  // The 'g' groups options involve a somewhat intricate sequence of decisions
+  // about what to pass from the driver to the frontend, but by the time they
+  // reach cc1 they've been factored into two well-defined orthogonal choices:
+  //  * what level of debug info to generate
+  //  * what dwarf version to write
+  // This avoids having to monkey around further in cc1 other than to disable
+  // codeview if not running in a Windows environment. Perhaps even that
+  // decision should be made in the driver as well though.
+  enum CodeGenOptions::DebugInfoKind DebugInfoKind =
+      CodeGenOptions::NoDebugInfo;
+  // These two are potentially updated by AddClangCLArgs.
+  unsigned DwarfVersion = 0;
+  bool EmitCodeView = false;
+
   // Add clang-cl arguments.
   if (getToolChain().getDriver().IsCLMode())
-    AddClangCLArgs(Args, CmdArgs);
+    AddClangCLArgs(Args, CmdArgs, &DebugInfoKind, &EmitCodeView);
 
   // Pass the linker version in use.
   if (Arg *A = Args.getLastArg(options::OPT_mlinker_version_EQ)) {
@@ -3753,41 +3806,41 @@ void Clang::ConstructJob(Compilation &C,
                                                  : "-");
   }
 
-  // Use the last option from "-g" group. "-gline-tables-only" and "-gdwarf-x"
-  // are preserved, all other debug options are substituted with "-g".
   Args.ClaimAllArgs(options::OPT_g_Group);
   Arg *SplitDwarfArg = Args.getLastArg(options::OPT_gsplit_dwarf);
   if (Arg *A = Args.getLastArg(options::OPT_g_Group)) {
+    // If you say "-gline-tables-only -gsplit-dwarf", split-dwarf wins,
+    // which mandates turning on "-g". But -split-dwarf is not a g_group option,
+    // hence it takes a nontrivial test to decide about line-tables-only.
     if (A->getOption().matches(options::OPT_gline_tables_only) &&
         (!SplitDwarfArg || A->getIndex() > SplitDwarfArg->getIndex())) {
-      // FIXME: we should support specifying dwarf version with
-      // -gline-tables-only.
-      CmdArgs.push_back("-gline-tables-only");
-      // Default is dwarf-2 for Darwin, OpenBSD, FreeBSD and Solaris.
-      const llvm::Triple &Triple = getToolChain().getTriple();
-      if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::OpenBSD ||
-          Triple.getOS() == llvm::Triple::FreeBSD ||
-          Triple.getOS() == llvm::Triple::Solaris)
-        CmdArgs.push_back("-gdwarf-2");
+      DebugInfoKind = CodeGenOptions::DebugLineTablesOnly;
       SplitDwarfArg = nullptr;
-    } else if (A->getOption().matches(options::OPT_gdwarf_2) ||
-               A->getOption().matches(options::OPT_gdwarf_3) ||
-               A->getOption().matches(options::OPT_gdwarf_4)) {
-      A->render(Args, CmdArgs);
     } else if (!A->getOption().matches(options::OPT_g0)) {
-      // Default is dwarf-2 for Darwin, OpenBSD, FreeBSD and Solaris.
-      const llvm::Triple &Triple = getToolChain().getTriple();
-      if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::OpenBSD ||
-          Triple.getOS() == llvm::Triple::FreeBSD ||
-          Triple.getOS() == llvm::Triple::Solaris)
-        CmdArgs.push_back("-gdwarf-2");
-      else
-        CmdArgs.push_back("-g");
+      // Some 'g' group option other than one expressly disabling debug info
+      // must have been the final (winning) one. They're all equivalent.
+      DebugInfoKind = CodeGenOptions::LimitedDebugInfo;
     }
   }
 
+  // If a -gdwarf argument appeared, use it, unless DebugInfoKind is None
+  // (because that would mean that "-g0" was the rightmost 'g' group option).
+  // FIXME: specifying "-gdwarf-<N>" "-g1" in that order works,
+  // but "-g1" "-gdwarf-<N>" does not. A deceptively simple (but wrong) "fix"
+  // exists of removing the gdwarf options from the g_group.
+  if (Arg *A = Args.getLastArg(options::OPT_gdwarf_2, options::OPT_gdwarf_3,
+                               options::OPT_gdwarf_4))
+    DwarfVersion = DwarfVersionNum(A->getSpelling());
+
   // Forward -gcodeview.
-  Args.AddLastArg(CmdArgs, options::OPT_gcodeview);
+  // 'EmitCodeView might have been set by CL-compatibility argument parsing.
+  if (Args.hasArg(options::OPT_gcodeview) || EmitCodeView) {
+    // DwarfVersion remains at 0 if no explicit choice was made.
+    CmdArgs.push_back("-gcodeview");
+  } else if (DwarfVersion == 0 &&
+             DebugInfoKind != CodeGenOptions::NoDebugInfo) {
+    DwarfVersion = getToolChain().GetDefaultDwarfVersion();
+  }
 
   // We ignore flags -gstrict-dwarf and -grecord-gcc-switches for now.
   Args.ClaimAllArgs(options::OPT_g_flags_Group);
@@ -3797,7 +3850,7 @@ void Clang::ConstructJob(Compilation &C,
 
   // FIXME: Move backend command line options to the module.
   if (Args.hasArg(options::OPT_gmodules)) {
-    CmdArgs.push_back("-g");
+    DebugInfoKind = CodeGenOptions::LimitedDebugInfo;
     CmdArgs.push_back("-dwarf-ext-refs");
     CmdArgs.push_back("-fmodule-format=obj");
   }
@@ -3806,11 +3859,23 @@ void Clang::ConstructJob(Compilation &C,
   // splitting and extraction.
   // FIXME: Currently only works on Linux.
   if (getToolChain().getTriple().isOSLinux() && SplitDwarfArg) {
-    CmdArgs.push_back("-g");
+    DebugInfoKind = CodeGenOptions::LimitedDebugInfo;
     CmdArgs.push_back("-backend-option");
     CmdArgs.push_back("-split-dwarf=Enable");
   }
 
+  // After we've dealt with all combinations of things that could
+  // make DebugInfoKind be other than None or DebugLineTablesOnly,
+  // figure out if we need to "upgrade" it to standalone debug info.
+  // We parse these two '-f' options whether or not they will be used,
+  // to claim them even if you wrote "-fstandalone-debug -gline-tables-only"
+  bool NeedFullDebug = Args.hasFlag(options::OPT_fstandalone_debug,
+                                    options::OPT_fno_standalone_debug,
+                                    getToolChain().GetDefaultStandaloneDebug());
+  if (DebugInfoKind == CodeGenOptions::LimitedDebugInfo && NeedFullDebug)
+    DebugInfoKind = CodeGenOptions::FullDebugInfo;
+  RenderDebugEnablingArgs(Args, CmdArgs, DebugInfoKind, DwarfVersion);
+
   // -ggnu-pubnames turns on gnu style pubnames in the backend.
   if (Args.hasArg(options::OPT_ggnu_pubnames)) {
     CmdArgs.push_back("-backend-option");
@@ -4173,8 +4238,6 @@ void Clang::ConstructJob(Compilation &C,
   // Forward -f (flag) options which we can pass directly.
   Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls);
   Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions);
-  Args.AddLastArg(CmdArgs, options::OPT_fstandalone_debug);
-  Args.AddLastArg(CmdArgs, options::OPT_fno_standalone_debug);
   Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names);
   // Emulated TLS is enabled by default on Android, and can be enabled manually
   // with -femulated-tls.
@@ -5336,7 +5399,9 @@ static EHFlags parseClangCLEHFlags(const
   return EH;
 }
 
-void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
+void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs,
+                           enum CodeGenOptions::DebugInfoKind *DebugInfoKind,
+                           bool *EmitCodeView) const {
   unsigned RTOptionID = options::OPT__SLASH_MT;
 
   if (Args.hasArg(options::OPT__SLASH_LDd))
@@ -5400,13 +5465,13 @@ void Clang::AddClangCLArgs(const ArgList
     CmdArgs.push_back("-fno-rtti-data");
 
   // Emit CodeView if -Z7 is present.
-  bool EmitCodeView = Args.hasArg(options::OPT__SLASH_Z7);
+  *EmitCodeView = Args.hasArg(options::OPT__SLASH_Z7);
   bool EmitDwarf = Args.hasArg(options::OPT_gdwarf);
   // If we are emitting CV but not DWARF, don't build information that LLVM
   // can't yet process.
-  if (EmitCodeView && !EmitDwarf)
-    CmdArgs.push_back("-gline-tables-only");
-  if (EmitCodeView)
+  if (*EmitCodeView && !EmitDwarf)
+    *DebugInfoKind = CodeGenOptions::DebugLineTablesOnly;
+  if (*EmitCodeView)
     CmdArgs.push_back("-gcodeview");
 
   const Driver &D = getToolChain().getDriver();
@@ -5557,14 +5622,20 @@ void ClangAs::ConstructJob(Compilation &
   // with an actual assembly file.
   if (SourceAction->getType() == types::TY_Asm ||
       SourceAction->getType() == types::TY_PP_Asm) {
+    bool WantDebug = false;
+    unsigned DwarfVersion = 0;
     Args.ClaimAllArgs(options::OPT_g_Group);
-    if (Arg *A = Args.getLastArg(options::OPT_g_Group))
-      if (!A->getOption().matches(options::OPT_g0))
-        CmdArgs.push_back("-g");
-
-    if (Arg *A = Args.getLastArg(options::OPT_gdwarf_2, options::OPT_gdwarf_3,
-                                 options::OPT_gdwarf_4))
-      A->render(Args, CmdArgs);
+    if (Arg *A = Args.getLastArg(options::OPT_g_Group)) {
+      WantDebug = !A->getOption().matches(options::OPT_g0);
+      if (WantDebug) {
+        if ((DwarfVersion = DwarfVersionNum(A->getSpelling())) == 0)
+          DwarfVersion = getToolChain().GetDefaultDwarfVersion();
+      }
+    }
+    RenderDebugEnablingArgs(Args, CmdArgs,
+                            (WantDebug ? CodeGenOptions::LimitedDebugInfo
+                                       : CodeGenOptions::NoDebugInfo),
+                            DwarfVersion);
 
     // Add the -fdebug-compilation-dir flag if needed.
     addDebugCompDirArg(Args, CmdArgs);

Modified: cfe/trunk/lib/Driver/Tools.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.h?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.h (original)
+++ cfe/trunk/lib/Driver/Tools.h Wed Oct  7 23:24:12 2015
@@ -14,6 +14,7 @@
 #include "clang/Driver/Tool.h"
 #include "clang/Driver/Types.h"
 #include "clang/Driver/Util.h"
+#include "clang/Frontend/CodeGenOptions.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Option/Option.h"
 #include "llvm/Support/Compiler.h"
@@ -88,7 +89,9 @@ private:
                                  RewriteKind rewrite) const;
 
   void AddClangCLArgs(const llvm::opt::ArgList &Args,
-                      llvm::opt::ArgStringList &CmdArgs) const;
+                      llvm::opt::ArgStringList &CmdArgs,
+                      enum CodeGenOptions::DebugInfoKind *DebugInfoKind,
+                      bool *EmitCodeView) const;
 
   visualstudio::Compiler *getCLFallback() const;
 

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Oct  7 23:24:12 2015
@@ -393,37 +393,17 @@ static bool ParseCodeGenArgs(CodeGenOpti
       Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name;
   }
 
-  if (Args.hasArg(OPT_gline_tables_only)) {
-    Opts.setDebugInfo(CodeGenOptions::DebugLineTablesOnly);
-  } 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) 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))
-      Opts.setDebugInfo(CodeGenOptions::FullDebugInfo);
-    else
-      Opts.setDebugInfo(CodeGenOptions::LimitedDebugInfo);
+  if (Arg *A = Args.getLastArg(OPT_debug_info_kind_EQ)) {
+    Opts.setDebugInfo(
+        llvm::StringSwitch<CodeGenOptions::DebugInfoKind>(A->getValue())
+            .Case("line-tables-only", CodeGenOptions::DebugLineTablesOnly)
+            .Case("limited", CodeGenOptions::LimitedDebugInfo)
+            .Case("standalone", CodeGenOptions::FullDebugInfo));
   }
+  Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 0, Diags);
   Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_info);
-  if (Args.hasArg(OPT_gcodeview)) {
-    Opts.EmitCodeView = true;
-    Opts.DwarfVersion = 0;
-  } else if (Opts.getDebugInfo() != CodeGenOptions::NoDebugInfo) {
-    // Default Dwarf version is 4 if we are generating debug information.
-    Opts.DwarfVersion = 4;
-  }
+  Opts.EmitCodeView = Args.hasArg(OPT_gcodeview);
   Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file);
-  if (Args.hasArg(OPT_gdwarf_2))
-    Opts.DwarfVersion = 2;
-  else if (Args.hasArg(OPT_gdwarf_3))
-    Opts.DwarfVersion = 3;
-  else if (Args.hasArg(OPT_gdwarf_4))
-    Opts.DwarfVersion = 4;
   Opts.DebugTypeExtRefs = Args.hasArg(OPT_dwarf_ext_refs);
 
   if (const Arg *A =

Modified: cfe/trunk/test/CodeGen/2006-01-13-Includes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2006-01-13-Includes.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2006-01-13-Includes.c (original)
+++ cfe/trunk/test/CodeGen/2006-01-13-Includes.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -g -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
 // PR676
 
 int printf(const char * restrict format, ...);

Modified: cfe/trunk/test/CodeGen/2007-05-11-str-const.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2007-05-11-str-const.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2007-05-11-str-const.c (original)
+++ cfe/trunk/test/CodeGen/2007-05-11-str-const.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s  -o /dev/null
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s  -o /dev/null
 
 static unsigned char out[]={0,1};
 static const unsigned char str1[]="1";

Modified: cfe/trunk/test/CodeGen/2009-01-21-InvalidIterator.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-01-21-InvalidIterator.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2009-01-21-InvalidIterator.c (original)
+++ cfe/trunk/test/CodeGen/2009-01-21-InvalidIterator.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -g -o /dev/null
+// RUN: %clang_cc1 %s -emit-llvm -debug-info-kind=limited -o /dev/null
 
 typedef long unsigned int size_t;
 typedef unsigned short int uint16_t;

Modified: cfe/trunk/test/CodeGen/2009-03-13-dbg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-03-13-dbg.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2009-03-13-dbg.c (original)
+++ cfe/trunk/test/CodeGen/2009-03-13-dbg.c Wed Oct  7 23:24:12 2015
@@ -1,2 +1,2 @@
-// RUN: %clang_cc1 %s -emit-llvm -g -o /dev/null
+// RUN: %clang_cc1 %s -emit-llvm -debug-info-kind=limited -o /dev/null
 void foo() {}

Modified: cfe/trunk/test/CodeGen/2009-04-23-dbg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-04-23-dbg.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2009-04-23-dbg.c (original)
+++ cfe/trunk/test/CodeGen/2009-04-23-dbg.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -S -g -o %t %s
+// RUN: %clang_cc1 -S -debug-info-kind=limited -o %t %s
 # 1 "a.c"
 # 1 "a.c" 1
 # 1 "<built-in>" 1

Modified: cfe/trunk/test/CodeGen/2009-07-31-DbgDeclare.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-07-31-DbgDeclare.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2009-07-31-DbgDeclare.c (original)
+++ cfe/trunk/test/CodeGen/2009-07-31-DbgDeclare.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -S -g -o %t.s %s
+// RUN: %clang_cc1 -S -debug-info-kind=limited -o %t.s %s
 void foo() {
      int i = 0;
      i = 42;

Modified: cfe/trunk/test/CodeGen/2010-01-14-FnType-DebugInfo.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-01-14-FnType-DebugInfo.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-01-14-FnType-DebugInfo.c (original)
+++ cfe/trunk/test/CodeGen/2010-01-14-FnType-DebugInfo.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -g -o /dev/null
+// RUN: %clang_cc1 %s -emit-llvm -debug-info-kind=limited -o /dev/null
 typedef void (*sigcatch_t)( struct sigcontext *);
 sigcatch_t sigcatch[50] = {(sigcatch_t) 0};
 

Modified: cfe/trunk/test/CodeGen/2010-01-18-Inlined-Debug.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-01-18-Inlined-Debug.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-01-18-Inlined-Debug.c (original)
+++ cfe/trunk/test/CodeGen/2010-01-18-Inlined-Debug.c Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // PR: 6058
-// RUN: %clang_cc1 -g -emit-llvm %s -o /dev/null
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o /dev/null
 
 static inline int foo(double) __attribute__ ((always_inline));
 static inline int foo(double __x) { return __x; }

Modified: cfe/trunk/test/CodeGen/2010-02-10-PointerName.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-02-10-PointerName.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-02-10-PointerName.c (original)
+++ cfe/trunk/test/CodeGen/2010-02-10-PointerName.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -g -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -debug-info-kind=limited -o - | FileCheck %s
 // CHECK: DW_TAG_pointer_type
 // CHECK-NOT: {"char"}
 

Modified: cfe/trunk/test/CodeGen/2010-02-15-DbgStaticVar.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-02-15-DbgStaticVar.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-02-15-DbgStaticVar.c (original)
+++ cfe/trunk/test/CodeGen/2010-02-15-DbgStaticVar.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 // Test to check intentionally empty linkage name for a static variable.
 // Radar 7651244.
 static int foo(int a)

Modified: cfe/trunk/test/CodeGen/2010-02-16-DbgScopes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-02-16-DbgScopes.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-02-16-DbgScopes.c (original)
+++ cfe/trunk/test/CodeGen/2010-02-16-DbgScopes.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g < %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited < %s | FileCheck %s
 // Test to check number of lexical scope identified in debug info.
 // CHECK: !DILexicalBlock(
 // CHECK: !DILexicalBlock(

Modified: cfe/trunk/test/CodeGen/2010-03-5-LexicalScope.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-03-5-LexicalScope.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-03-5-LexicalScope.c (original)
+++ cfe/trunk/test/CodeGen/2010-03-5-LexicalScope.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 // CHECK: !DILexicalBlock(
 // CHECK: !DILexicalBlock(
 int foo(int i) {

Modified: cfe/trunk/test/CodeGen/2010-07-08-DeclDebugLineNo.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-07-08-DeclDebugLineNo.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-07-08-DeclDebugLineNo.c (original)
+++ cfe/trunk/test/CodeGen/2010-07-08-DeclDebugLineNo.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 // Insure that dbg.declare lines for locals refer to correct line number records.
 // Radar 8152866.
 void foo() {

Modified: cfe/trunk/test/CodeGen/2010-08-10-DbgConstant.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-08-10-DbgConstant.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2010-08-10-DbgConstant.c (original)
+++ cfe/trunk/test/CodeGen/2010-08-10-DbgConstant.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -S -emit-llvm -g  %s -o - | FileCheck %s
+// RUN: %clang_cc1 -S -emit-llvm -debug-info-kind=limited  %s -o - | FileCheck %s
 // CHECK: !DIGlobalVariable(
 
 static const unsigned int ro = 201;

Modified: cfe/trunk/test/CodeGen/attr-nodebug.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-nodebug.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-nodebug.c (original)
+++ cfe/trunk/test/CodeGen/attr-nodebug.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 
 void t1() __attribute__((nodebug));
 

Modified: cfe/trunk/test/CodeGen/attr-noinline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-noinline.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-noinline.c (original)
+++ cfe/trunk/test/CodeGen/attr-noinline.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o %t %s
 // RUN: grep 'noinline' %t
 
 void t1() __attribute__((noinline));

Modified: cfe/trunk/test/CodeGen/cleanup-destslot-simple.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/cleanup-destslot-simple.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/cleanup-destslot-simple.c (original)
+++ cfe/trunk/test/CodeGen/cleanup-destslot-simple.c Wed Oct  7 23:24:12 2015
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=LIFETIME
+// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=LIFETIME
 
 // We shouldn't have markers at -O0 or with msan.
-// RUN: %clang_cc1 -O0 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s --check-prefix=CHECK
-// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - -fsanitize=memory | FileCheck %s --check-prefix=CHECK
+// RUN: %clang_cc1 -O0 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s --check-prefix=CHECK
+// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - -fsanitize=memory | FileCheck %s --check-prefix=CHECK
 
 // There is no exception to handle here, lifetime.end is not a destructor,
 // so there is no need have cleanup dest slot related code

Modified: cfe/trunk/test/CodeGen/debug-info-257-args.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-257-args.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-257-args.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-257-args.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x c++ -g -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s
+// RUN: %clang_cc1 -x c++ -debug-info-kind=limited -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s
 // PR23332
 
 // CHECK: DILocalVariable(arg: 255

Modified: cfe/trunk/test/CodeGen/debug-info-args.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-args.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-args.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-args.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -g %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s
 
 int somefunc(char *x, int y, double z) {
   

Modified: cfe/trunk/test/CodeGen/debug-info-block-decl.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-block-decl.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-block-decl.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-block-decl.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fblocks -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -fblocks -emit-llvm -o - %s | FileCheck %s
 // Assignment and block entry should point to the same line.
 // rdar://problem/14039866
 

Modified: cfe/trunk/test/CodeGen/debug-info-block-out-return.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-block-out-return.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-block-out-return.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-block-out-return.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fblocks -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -fblocks -emit-llvm -o - %s | FileCheck %s
 
 // Check that arg numbering is not affected by LLVM IR argument numbering -
 // since the latter is affected by return-by-out-parameter ABI requirements

Modified: cfe/trunk/test/CodeGen/debug-info-block.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-block.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-block.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-block.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -g -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 // Verify that the desired debugging type is generated for a structure
 // member that is a pointer to a block.
 

Modified: cfe/trunk/test/CodeGen/debug-info-compilation-dir.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-compilation-dir.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-compilation-dir.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-compilation-dir.c Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fdebug-compilation-dir /nonsense -emit-llvm -g %s -o - | FileCheck -check-prefix=CHECK-NONSENSE %s
+// RUN: %clang_cc1 -fdebug-compilation-dir /nonsense -emit-llvm -debug-info-kind=limited %s -o - | FileCheck -check-prefix=CHECK-NONSENSE %s
 // CHECK-NONSENSE: nonsense
 
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck -check-prefix=CHECK-DIR %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck -check-prefix=CHECK-DIR %s
 // CHECK-DIR: CodeGen
 

Modified: cfe/trunk/test/CodeGen/debug-info-crash.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-crash.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-crash.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-crash.c Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -g -S %s -o -
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -debug-info-kind=limited -S %s -o -
 
 // rdar://7590323
 typedef struct dispatch_queue_s *dispatch_queue_t;

Modified: cfe/trunk/test/CodeGen/debug-info-enum.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-enum.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-enum.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-enum.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
 // CHECK-SAME:             elements: [[TEST3_ENUMS:![0-9]*]]

Modified: cfe/trunk/test/CodeGen/debug-info-gline-tables-only.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-gline-tables-only.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-gline-tables-only.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-gline-tables-only.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -gline-tables-only -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s
 // Checks that clang with "-gline-tables-only" doesn't emit debug info
 // for variables and types.
 

Modified: cfe/trunk/test/CodeGen/debug-info-gline-tables-only2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-gline-tables-only2.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-gline-tables-only2.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-gline-tables-only2.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -gline-tables-only -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s
 // Checks that clang with "-gline-tables-only" emits metadata for
 // compile unit, subprogram and file.
 

Modified: cfe/trunk/test/CodeGen/debug-info-line.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-line.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-line.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-line.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -w -gline-tables-only -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s
 
 int f1(int a, int b) {
   // CHECK: icmp {{.*}}, !dbg [[DBG_F1:!.*]]

Modified: cfe/trunk/test/CodeGen/debug-info-line2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-line2.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-line2.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-line2.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-darwin-apple -g -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-darwin-apple -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 // Radar 9199234
 
 int bar();

Modified: cfe/trunk/test/CodeGen/debug-info-line3.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-line3.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-line3.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-line3.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -S -emit-llvm %s -o - | FileCheck %s
 
 void func(char c, char* d)
 {

Modified: cfe/trunk/test/CodeGen/debug-info-member.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-member.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-member.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-member.c Wed Oct  7 23:24:12 2015
@@ -1,3 +1,3 @@
-// RUN: %clang_cc1 -emit-llvm -g < %s | grep DW_TAG_member 
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited < %s | grep DW_TAG_member
 
 struct A { int x; } a;

Modified: cfe/trunk/test/CodeGen/debug-info-packed-struct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-packed-struct.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-packed-struct.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-packed-struct.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x c -g -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
+// RUN: %clang_cc1 -x c -debug-info-kind=limited -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
 
 // CHECK: %struct.layout0 = type { i8, %struct.size8, i8 }
 // CHECK: %struct.layout1 = type <{ i8, %struct.size8_anon, i8, [2 x i8] }>

Modified: cfe/trunk/test/CodeGen/debug-info-same-line.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-same-line.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-same-line.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-same-line.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -g -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -debug-info-kind=limited -o - | FileCheck %s
 // Here two temporary nodes are identical (but should not get uniqued) while
 // building the full debug type.
 typedef struct { long x; } foo; typedef struct {  foo *x; } bar;

Modified: cfe/trunk/test/CodeGen/debug-info-scope-file.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-scope-file.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-scope-file.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-scope-file.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm < %s | FileCheck %s
 
 // Check that, just because we emitted a function from a different file doesn't
 // mean we insert a file-change inside the next function.

Modified: cfe/trunk/test/CodeGen/debug-info-scope.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-scope.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-scope.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-scope.c Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s
-// RUN: %clang_cc1 -gline-tables-only -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
+// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=limited -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-tables-only -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
 // Two variables with same name in separate scope.
 // Radar 8330217.
 int main() {

Modified: cfe/trunk/test/CodeGen/debug-info-static.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-static.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-static.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-static.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -g -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1  -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 
 // CHECK: !DIGlobalVariable({{.*}}variable: i32* @f.xyzzy
 void f(void)

Modified: cfe/trunk/test/CodeGen/debug-info-typedef.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-typedef.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-typedef.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-typedef.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -I%p %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -I%p %s -o - | FileCheck %s
 // Test that the location of the typedef points to the header file.
 #line 1 "a.c"
 #line 2 "b.h"

Modified: cfe/trunk/test/CodeGen/debug-info-vector.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-vector.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-vector.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-vector.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 typedef int v4si __attribute__((__vector_size__(16)));
 
 v4si a;

Modified: cfe/trunk/test/CodeGen/debug-info-vla.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-vla.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-vla.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-vla.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 void testVLAwithSize(int s)
 {

Modified: cfe/trunk/test/CodeGen/debug-info.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info.c (original)
+++ cfe/trunk/test/CodeGen/debug-info.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -g %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s
 
 // PR3023
 void convert(void) {

Modified: cfe/trunk/test/CodeGen/debug-line-1.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-line-1.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-line-1.c (original)
+++ cfe/trunk/test/CodeGen/debug-line-1.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -o - -emit-llvm -g %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s
 // REQUIRES: asserts
 // PR9796
 

Modified: cfe/trunk/test/CodeGen/enum2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/enum2.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/enum2.c (original)
+++ cfe/trunk/test/CodeGen/enum2.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown %s -g -emit-llvm -o /dev/null
+// RUN: %clang_cc1 -triple i386-unknown-unknown %s -debug-info-kind=limited -emit-llvm -o /dev/null
 int v;
 enum e { MAX };
 

Modified: cfe/trunk/test/CodeGen/global-blocks-lines.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/global-blocks-lines.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/global-blocks-lines.c (original)
+++ cfe/trunk/test/CodeGen/global-blocks-lines.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 // Make sure we do not generate line info for debugging-related frame setup.
 // CHECK: define {{.*}}block_invoke
 // CHECK-NOT: store {{.*}}%struct.__block_descriptor*{{.*}}dbg

Modified: cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c (original)
+++ cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s
+// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
 
 // Inserting lifetime markers should not affect debuginfo
 

Modified: cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c (original)
+++ cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s
+// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
 
 // Inserting lifetime markers should not affect debuginfo: lifetime.end is not
 // a destructor, but instrumentation for the compiler. Ensure the debug info for

Modified: cfe/trunk/test/CodeGen/lineno-dbginfo.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/lineno-dbginfo.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/lineno-dbginfo.c (original)
+++ cfe/trunk/test/CodeGen/lineno-dbginfo.c Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: echo "#include <stddef.h>" > %t.h
-// RUN: %clang_cc1 -S -g -include %t.h %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -S -debug-info-kind=limited -include %t.h %s -emit-llvm -o - | FileCheck %s
 
 // CHECK: !DIGlobalVariable(name: "outer",
 // CHECK-NOT:               linkageName:

Modified: cfe/trunk/test/CodeGen/linetable-endscope.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/linetable-endscope.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/linetable-endscope.c (original)
+++ cfe/trunk/test/CodeGen/linetable-endscope.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 
 // Check the line numbers for the ret instruction. We expect it to be
 // at the closing of the lexical scope in this case. See the comments in

Modified: cfe/trunk/test/CodeGen/sse-builtins-dbg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/sse-builtins-dbg.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/sse-builtins-dbg.c (original)
+++ cfe/trunk/test/CodeGen/sse-builtins-dbg.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 
 // Test that intrinsic calls inlined from _mm_* wrappers have debug metadata.
 

Modified: cfe/trunk/test/CodeGen/vector.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/vector.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/vector.c (original)
+++ cfe/trunk/test/CodeGen/vector.c Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -O1 -target-cpu pentium4 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -O1 -target-cpu pentium4 -target-feature +sse4.1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 typedef short __v4hi __attribute__ ((__vector_size__ (8)));
 
 void test1() {

Modified: cfe/trunk/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // PR1013
 // Check to make sure debug symbols use the correct name for globals and
 // functions.  Will not assemble if it fails to.
-// RUN: %clang_cc1 -emit-llvm -g -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
 
 // CHECK: f\01oo"
 int foo __asm__("f\001oo");

Modified: cfe/trunk/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
 // Make sure unbounded arrays compile with debug information.
 //
-// RUN: %clang_cc1 -emit-llvm -g %s -o -
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o -
 
 // PR1068
 

Modified: cfe/trunk/test/CodeGenCXX/2009-03-17-dbg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2009-03-17-dbg.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2009-03-17-dbg.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2009-03-17-dbg.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o /dev/null -g
+// RUN: %clang_cc1 -emit-llvm %s -o /dev/null -debug-info-kind=limited
 
 template <typename T1,typename T2>
 inline void f(const T1&,const T2&) { }

Modified: cfe/trunk/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o /dev/null -g
+// RUN: %clang_cc1 -emit-llvm %s -o /dev/null -debug-info-kind=limited
 // This crashes if we try to emit debug info for TEMPLATE_DECL members.
 template <class T> class K2PtrVectorBase {};
 template <class T> class K2Vector {};

Modified: cfe/trunk/test/CodeGenCXX/2010-03-09-AnonAggregate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2010-03-09-AnonAggregate.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2010-03-09-AnonAggregate.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2010-03-09-AnonAggregate.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -S -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -S -o %t %s
 // PR: 6554
 // More then one anonymous aggregates on one line creates chaos when MDNode uniquness is 
 // combined with RAUW operation.

Modified: cfe/trunk/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o /dev/null
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o /dev/null
 // PR 7104
 
 struct A {

Modified: cfe/trunk/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 -emit-llvm -g -o - %s | FileCheck %s
+//RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
 //CHECK: DILocalVariable(
 class Foo
 {

Modified: cfe/trunk/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 // Do not use function name to create named metadata used to hold
 // local variable info. For example. llvm.dbg.lv.~A is an invalid name.
 

Modified: cfe/trunk/test/CodeGenCXX/2010-06-22-BitfieldInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2010-06-22-BitfieldInit.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2010-06-22-BitfieldInit.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2010-06-22-BitfieldInit.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o -
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o -
 struct TEST2
 {
   int subid:32;

Modified: cfe/trunk/test/CodeGenCXX/2010-06-22-ZeroBitfield.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2010-06-22-ZeroBitfield.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2010-06-22-ZeroBitfield.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2010-06-22-ZeroBitfield.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o -
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o -
 struct s8_0 { unsigned : 0; };
 struct s8_1 { double x; };
 struct s8 { s8_0 a; s8_1 b; };

Modified: cfe/trunk/test/CodeGenCXX/2010-07-23-DeclLoc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2010-07-23-DeclLoc.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2010-07-23-DeclLoc.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2010-07-23-DeclLoc.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 // Require the template function declaration refer to the correct filename.
 // First, locate the function decl in metadata, and pluck out the file handle:
 // CHECK: !DISubprogram(name: "extract_dwarf_data_from_header

Modified: cfe/trunk/test/CodeGenCXX/PR20038.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/PR20038.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/PR20038.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/PR20038.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -g -mllvm -no-discriminators -emit-llvm  %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -debug-info-kind=limited -mllvm -no-discriminators -emit-llvm  %s -o - | FileCheck %s
 
 struct C {
   ~C();

Modified: cfe/trunk/test/CodeGenCXX/cp-blocks-linetables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cp-blocks-linetables.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/cp-blocks-linetables.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/cp-blocks-linetables.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 // Ensure that we generate a line table entry for the block cleanup.
 // CHECK: define {{.*}} @__main_block_invoke
 // CHECK: _NSConcreteStackBlock

Modified: cfe/trunk/test/CodeGenCXX/crash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/crash.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/crash.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/crash.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
 // XFAIL: hexagon
 // RUN: %clang_cc1 %s -std=c++11 -emit-llvm-only
-// RUN: %clang_cc1 -emit-obj -o %t -gline-tables-only -std=c++11 %s
+// RUN: %clang_cc1 -emit-obj -o %t -debug-info-kind=line-tables-only -std=c++11 %s
 // CHECK that we don't crash.
 
 // PR11676's example is ill-formed:

Modified: cfe/trunk/test/CodeGenCXX/debug-info-access.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-access.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-access.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-access.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple %itanium_abi_triple %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple %itanium_abi_triple %s -o - | FileCheck %s
 // Test the various accessibility flags in the debug info.
 struct A {
   // CHECK-DAG: !DISubprogram(name: "pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,

Modified: cfe/trunk/test/CodeGenCXX/debug-info-anon-union-vars.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-anon-union-vars.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-anon-union-vars.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-anon-union-vars.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -gdwarf-4 -triple x86_64-linux-gnu %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-linux-gnu %s -o - | FileCheck %s
 
 // Make sure that we emit a global variable for each of the members of the
 // anonymous union.

Modified: cfe/trunk/test/CodeGenCXX/debug-info-artificial-arg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-artificial-arg.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-artificial-arg.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-artificial-arg.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 template<class X> class B {
 public:

Modified: cfe/trunk/test/CodeGenCXX/debug-info-blocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-blocks.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-blocks.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-blocks.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -gline-tables-only -fblocks -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -fblocks -S -emit-llvm -o - | FileCheck %s
 
 struct A {
   A();

Modified: cfe/trunk/test/CodeGenCXX/debug-info-char16.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-char16.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-char16.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-char16.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o -| FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -debug-info-kind=limited %s -o -| FileCheck %s
 
 // 16 is DW_ATE_UTF (0x10) encoding attribute.
 char16_t char_a = u'h';

Modified: cfe/trunk/test/CodeGenCXX/debug-info-class-nolimit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-class-nolimit.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-class-nolimit.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-class-nolimit.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,7 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -fstandalone-debug -o - -emit-llvm -g %s | FileCheck %s
-// On Darwin, this should be the default:
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -o - -emit-llvm -g %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unk-unk -debug-info-kind=standalone -o - -emit-llvm %s | FileCheck %s
+// On Darwin, "full" debug info is the default, so really these tests are
+// identical, as cc1 no longer chooses the effective value of DebugInfoKind.
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -debug-info-kind=standalone -o - -emit-llvm %s | FileCheck %s
 
 namespace rdar14101097_1 { // see also PR16214
 // Check that we emit debug info for the definition of a struct if the
@@ -33,4 +34,3 @@ void bar() {
 struct foo {
 };
 }
-

Modified: cfe/trunk/test/CodeGenCXX/debug-info-context.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-context.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-context.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-context.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 // PR11345
 
 class locale {

Modified: cfe/trunk/test/CodeGenCXX/debug-info-cxx0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-cxx0x.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-cxx0x.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-cxx0x.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only -std=c++11 -g %s
+// RUN: %clang_cc1 -emit-llvm-only -std=c++11 -debug-info-kind=limited %s
 
 namespace PR9414 {
   int f() {

Modified: cfe/trunk/test/CodeGenCXX/debug-info-cxx1y.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-cxx1y.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-cxx1y.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-cxx1y.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: [[EMPTY:![0-9]*]] = !{}
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",

Modified: cfe/trunk/test/CodeGenCXX/debug-info-decl-nested.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-decl-nested.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-decl-nested.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-decl-nested.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -g -emit-llvm -g -triple x86_64-apple-darwin %s -o %t
+// RUN: %clang_cc1 -std=c++11 -debug-info-kind=standalone -emit-llvm -triple x86_64-apple-darwin %s -o %t
 // RUN: cat %t | FileCheck %s -check-prefix=CHECK0
 // RUN: cat %t | FileCheck %s -check-prefix=CHECK1
 // RUN: cat %t | FileCheck %s -check-prefix=CHECK2

Modified: cfe/trunk/test/CodeGenCXX/debug-info-determinism.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-determinism.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-determinism.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-determinism.cpp Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -S -emit-llvm -g -o %t1.ll %s
-// RUN: %clang_cc1 -S -emit-llvm -g -o %t2.ll %s
+// RUN: %clang_cc1 -S -emit-llvm -debug-info-kind=limited -o %t1.ll %s
+// RUN: %clang_cc1 -S -emit-llvm -debug-info-kind=limited -o %t2.ll %s
 // RUN: diff %t1.ll %t2.ll
 
 template <int N> struct C {

Modified: cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -fstandalone-debug %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 class Test
 {

Modified: cfe/trunk/test/CodeGenCXX/debug-info-enum-class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-enum-class.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-enum-class.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-enum-class.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
 
 enum class A { A1=1 };                 // underlying type is int by default
 enum class B: unsigned long { B1=1 };  // underlying type is unsigned long

Modified: cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: !DICompileUnit(
 // CHECK-SAME:           enums: [[ENUMS:![0-9]*]]

Modified: cfe/trunk/test/CodeGenCXX/debug-info-flex-member.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-flex-member.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-flex-member.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-flex-member.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 // CHECK: !DISubrange(count: -1)
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-function-context.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-function-context.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-function-context.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-function-context.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-pc-linux-gnu %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-pc-linux-gnu %s -o - | FileCheck %s
 
 struct C {
   void member_function();

Modified: cfe/trunk/test/CodeGenCXX/debug-info-fwd-ref.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-fwd-ref.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-fwd-ref.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-fwd-ref.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 struct baz {
     int h;

Modified: cfe/trunk/test/CodeGenCXX/debug-info-gline-tables-only.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-gline-tables-only.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-gline-tables-only.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-gline-tables-only.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fno-rtti -gline-tables-only -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fno-rtti -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s
 // Checks that clang with "-gline-tables-only" doesn't emit debug info
 // for variables and types.
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 %s -g -triple %itanium_abi_triple -fno-use-cxa-atexit -S -emit-llvm -o - \
+// RUN: %clang_cc1 %s -debug-info-kind=limited -triple %itanium_abi_triple -fno-use-cxa-atexit -S -emit-llvm -o - \
 // RUN:     | FileCheck %s --check-prefix=CHECK-NOKEXT
-// RUN: %clang_cc1 %s -g -triple %itanium_abi_triple -fno-use-cxa-atexit -fapple-kext -S -emit-llvm -o - \
+// RUN: %clang_cc1 %s -debug-info-kind=limited -triple %itanium_abi_triple -fno-use-cxa-atexit -fapple-kext -S -emit-llvm -o - \
 // RUN:     | FileCheck %s --check-prefix=CHECK-KEXT
 
 class A {

Modified: cfe/trunk/test/CodeGenCXX/debug-info-global.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-global.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-global.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-global.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 // Multiple references to the same constant should result in only one entry in
 // the globals list.

Modified: cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -std=c++11 -g | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -std=c++11 -debug-info-kind=limited | FileCheck %s
 
 void crash() {
   volatile char *ptr = 0;

Modified: cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-indirect-field-decl.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 //
 // Test that indirect field decls are handled gracefully.
 // rdar://problem/16348575

Modified: cfe/trunk/test/CodeGenCXX/debug-info-large-constant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-large-constant.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-large-constant.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-large-constant.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -triple=x86_64-apple-darwin %s -o /dev/null
+// RUN: %clang_cc1 -debug-info-kind=limited -triple=x86_64-apple-darwin %s -o /dev/null
 // PR 8913
 
 typedef __uint128_t word128;

Modified: cfe/trunk/test/CodeGenCXX/debug-info-line-if.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-line-if.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-line-if.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-line-if.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
 // PR19864
 extern int v[2];
 int a = 0, b = 0;

Modified: cfe/trunk/test/CodeGenCXX/debug-info-line.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-line.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-line.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-line.cpp Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -w -gline-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -w -gline-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
 
 // XFAIL: win32
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-method-nodebug.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-method-nodebug.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-method-nodebug.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-method-nodebug.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 class C {
   void present();

Modified: cfe/trunk/test/CodeGenCXX/debug-info-method.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-method.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-method.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-method.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -debug-info-kind=limited %s -o - | FileCheck %s
 // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A",{{.*}} identifier: "_ZTS1A")
 // CHECK: !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEiS_3$_0"
 // CHECK-SAME:          DIFlagProtected

Modified: cfe/trunk/test/CodeGenCXX/debug-info-method2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-method2.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-method2.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-method2.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fno-standalone-debug -x c++ -g -S -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -x c++ -debug-info-kind=limited -S -emit-llvm < %s | FileCheck %s
 // rdar://10336845
 // Preserve type qualifiers in -flimit-debug-info mode.
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -g -fno-standalone-debug -S -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -g -gline-tables-only    -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s
-// RUN: %clang_cc1 -g -fstandalone-debug    -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s
+// RUN: %clang_cc1 -debug-info-kind=limited -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=line-tables-only -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s
+// RUN: %clang_cc1 -debug-info-kind=standalone -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s
 
 namespace A {
 #line 1 "foo.cpp"

Modified: cfe/trunk/test/CodeGenCXX/debug-info-nullptr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-nullptr.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-nullptr.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-nullptr.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o -| FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -std=c++11 -debug-info-kind=limited %s -o -| FileCheck %s
 
 void foo() {
   decltype(nullptr) t = 0;

Modified: cfe/trunk/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin -g -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=DARWIN-X64 %s
-// RUN: %clang_cc1 %s -triple x86_64-pc-win32     -g -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=WIN32-X64 %s
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin -debug-info-kind=limited -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=DARWIN-X64 %s
+// RUN: %clang_cc1 %s -triple x86_64-pc-win32     -debug-info-kind=limited -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=WIN32-X64 %s
 
 struct T {
   int method();

Modified: cfe/trunk/test/CodeGenCXX/debug-info-qualifiers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-qualifiers.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-qualifiers.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-qualifiers.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 // Test (r)value and CVR qualifiers on C++11 non-static member functions.
 class A {
 public:

Modified: cfe/trunk/test/CodeGenCXX/debug-info-rvalue-ref.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-rvalue-ref.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-rvalue-ref.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-rvalue-ref.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 extern "C" {
 extern int printf(const char * format, ...);

Modified: cfe/trunk/test/CodeGenCXX/debug-info-scope.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-scope.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-scope.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-scope.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -std=c++11 -emit-llvm %s -o -| FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -std=c++11 -emit-llvm %s -o -| FileCheck %s
 //
 // Two variables with the same name in subsequent if staments need to be in separate scopes.
 //

Modified: cfe/trunk/test/CodeGenCXX/debug-info-static-fns.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-static-fns.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-static-fns.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-static-fns.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 namespace A {
   static int a(int b) { return b + 4; }

Modified: cfe/trunk/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp Wed Oct  7 23:24:12 2015
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -fno-standalone-debug | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=limited %s -o - | FileCheck %s
 
 // Run again with -gline-tables-only and verify we don't crash.  We won't output
 // type info at all.
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -gline-tables-only | FileCheck %s -check-prefix LINES-ONLY
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=line-tables-only %s -o - | FileCheck %s -check-prefix LINES-ONLY
 
 // LINES-ONLY-NOT: !DICompositeType(tag: DW_TAG_structure_type
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-template-fwd.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-fwd.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-template-fwd.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-template-fwd.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
 // This test is for a crash when emitting debug info for not-yet-completed
 // types.
 // Test that we don't actually emit a forward decl for the offending class:

Modified: cfe/trunk/test/CodeGenCXX/debug-info-template-limit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-limit.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-template-limit.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-template-limit.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -triple %itanium_abi_triple -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple %itanium_abi_triple %s -o - | FileCheck %s
 
 // Check that this pointer type is TC<int>
 // CHECK: ![[LINE:[0-9]+]] = !DICompositeType(tag: DW_TAG_class_type, name: "TC<int>"{{.*}}, identifier: "_ZTS2TCIiE")

Modified: cfe/trunk/test/CodeGenCXX/debug-info-template-member.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-member.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-template-member.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-template-member.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -fno-standalone-debug -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 struct MyClass {
   template <int i> int add(int j) {
@@ -98,4 +98,3 @@ inline void f1() {
 void f2() {
   virt<elem> d; // emit 'virt<elem>'
 }
-

Modified: cfe/trunk/test/CodeGenCXX/debug-info-template-partial-specialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-partial-specialization.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-template-partial-specialization.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-template-partial-specialization.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -fstandalone-debug | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - -debug-info-kind=standalone | FileCheck %s
 namespace __pointer_type_imp
 {
   template <class _Tp, class _Dp, bool > struct __pointer_type1 {};

Modified: cfe/trunk/test/CodeGenCXX/debug-info-template-quals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-quals.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-template-quals.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-template-quals.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 template<typename _CharT>
 struct basic_string {

Modified: cfe/trunk/test/CodeGenCXX/debug-info-template-recursive.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-template-recursive.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-template-recursive.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-template-recursive.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
 class base { };
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-thunk.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-thunk.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-thunk.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-thunk.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple %itanium_abi_triple -g -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -debug-info-kind=limited -S -emit-llvm -o - | FileCheck %s
 
 struct A {
   virtual void f();

Modified: cfe/trunk/test/CodeGenCXX/debug-info-union-template.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-union-template.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-union-template.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-union-template.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-linux-gnu  %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-linux-gnu  %s -o - | FileCheck %s
 
 // Make sure that the union type has template parameters.
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-union.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-union.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-union.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-union.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
 
 union E {
   int a;

Modified: cfe/trunk/test/CodeGenCXX/debug-info-use-after-free.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-use-after-free.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-use-after-free.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-use-after-free.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -triple %itanium_abi_triple -emit-llvm-only %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple -emit-llvm-only %s
 // Check that we don't crash.
 // PR12305, PR12315
 

Modified: cfe/trunk/test/CodeGenCXX/debug-info-uuid.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-uuid.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-uuid.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-uuid.cpp Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -g %s -o - -std=c++11 | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -g %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
+// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -debug-info-kind=limited %s -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -debug-info-kind=limited %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
 // CHECK-SAME:             templateParams: [[TGIARGS:![0-9]*]]

Modified: cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 struct A
 {

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=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-vtable-optzn.cpp Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
-// 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
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -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

Modified: cfe/trunk/test/CodeGenCXX/debug-info-wchar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-wchar.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-wchar.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-wchar.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o -| FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o -| FileCheck %s
 void foo() {
 // CHECK: !DIBasicType(name: "wchar_t"
   const wchar_t w = L'x';

Modified: cfe/trunk/test/CodeGenCXX/debug-info-windows-dtor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-windows-dtor.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-windows-dtor.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-windows-dtor.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-unknown-windows-msvc -std=c++11 -emit-llvm -gline-tables-only %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-windows-msvc -std=c++11 -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
 
 struct A {
   virtual ~A() {}

Modified: cfe/trunk/test/CodeGenCXX/debug-info.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info.cpp Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -g %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple i686-pc-windows-msvc -emit-llvm -g %s -o - | FileCheck %s --check-prefix=MSVC
+// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686-pc-windows-msvc -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=MSVC
 
 template<typename T> struct Identity {
   typedef T Type;

Modified: cfe/trunk/test/CodeGenCXX/debug-lambda-expressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-lambda-expressions.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-lambda-expressions.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-lambda-expressions.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -fexceptions -std=c++11 -g | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -fexceptions -std=c++11 -debug-info-kind=limited | FileCheck %s
 
 auto var = [](int i) { return i+1; };
 void *use = &var;

Modified: cfe/trunk/test/CodeGenCXX/debug-lambda-this.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-lambda-this.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-lambda-this.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-lambda-this.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -fexceptions -std=c++11 -g | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -fexceptions -std=c++11 -debug-info-kind=limited | FileCheck %s
 
 struct D {
   D();

Modified: cfe/trunk/test/CodeGenCXX/destructor-debug-info.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/destructor-debug-info.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/destructor-debug-info.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/destructor-debug-info.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -S -emit-llvm %s -o - | FileCheck %s
 
 class A { int a; };
 class B {

Modified: cfe/trunk/test/CodeGenCXX/globalinit-loc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/globalinit-loc.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/globalinit-loc.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/globalinit-loc.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 // rdar://problem/14985269.
 //
 // Verify that the global init helper function does not get associated

Modified: cfe/trunk/test/CodeGenCXX/inline-dllexport-member.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/inline-dllexport-member.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/inline-dllexport-member.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/inline-dllexport-member.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-windows-gnu -fms-compatibility -g -emit-llvm %s -o - \
+// RUN: %clang_cc1 -triple i686-windows-gnu -fms-compatibility -debug-info-kind=limited -emit-llvm %s -o - \
 // RUN:    | FileCheck %s
 
 struct __declspec(dllexport) s {

Modified: cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/linetable-cleanup.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 
 // Check the line numbers for cleanup code with EH in combination with
 // simple return expressions.

Modified: cfe/trunk/test/CodeGenCXX/linetable-eh.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/linetable-eh.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/linetable-eh.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/linetable-eh.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-macosx10.9.0 -munwind-tables -std=c++11 -fcxx-exceptions -fexceptions %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-macosx10.9.0 -munwind-tables -std=c++11 -fcxx-exceptions -fexceptions %s -o - | FileCheck %s
 
 // Test that emitting a landing pad does not affect the line table
 // entries for the code that triggered it.

Modified: cfe/trunk/test/CodeGenCXX/linetable-fnbegin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/linetable-fnbegin.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/linetable-fnbegin.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/linetable-fnbegin.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 // Test that the line table info for Foo<T>::bar() is pointing to the
 // right header file.
 // CHECK: define{{.*}}bar

Modified: cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -gline-tables-only %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
 // Crasher for PR22929.
 class Base {
   virtual void VariadicFunction(...);

Modified: cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/lpad-linetable.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fcxx-exceptions -fexceptions -emit-llvm -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1  -fcxx-exceptions -fexceptions -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 // The landing pad should have the line number of the closing brace of the function.
 // rdar://problem/13888152
 // CHECK: ret i32

Modified: cfe/trunk/test/CodeGenCXX/scoped-enums-debug-info.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/scoped-enums-debug-info.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/scoped-enums-debug-info.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/scoped-enums-debug-info.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -g -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
 // Test that we are emitting debug info and base types for scoped enums.
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Color"

Modified: cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-holder-self-reference.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -gdwarf-2 -x c++ -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -dwarf-version=2 -debug-info-kind=limited -x c++ -o - %s | FileCheck %s
 //
 // PR21941: crasher for self-referencing DW_TAG_structure_type node.  If we get
 // rid of self-referenceing structure_types (PR21902), then it should be safe

Modified: cfe/trunk/test/CodeGenObjC/2009-01-21-invalid-debug-info.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2009-01-21-invalid-debug-info.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2009-01-21-invalid-debug-info.m (original)
+++ cfe/trunk/test/CodeGenObjC/2009-01-21-invalid-debug-info.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -S -g -o %t.s %s
+// RUN: %clang_cc1 -S -debug-info-kind=limited -o %t.s %s
 
 // FIXME: This test case can be removed at some point (since it will
 // no longer effectively test anything). The reason it was causing

Modified: cfe/trunk/test/CodeGenObjC/2010-02-09-DbgSelf.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2010-02-09-DbgSelf.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2010-02-09-DbgSelf.m (original)
+++ cfe/trunk/test/CodeGenObjC/2010-02-09-DbgSelf.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c -emit-llvm -g < %s | FileCheck %s
+// RUN: %clang_cc1 -x objective-c -emit-llvm -debug-info-kind=limited < %s | FileCheck %s
 // Test to check that "self" argument is assigned a location.
 // CHECK: call void @llvm.dbg.declare(metadata %0** %{{[^,]+}}, metadata [[SELF:![0-9]*]], metadata !{{.*}})
 // CHECK: [[SELF]] = !DILocalVariable(name: "self", arg: 1,

Modified: cfe/trunk/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m (original)
+++ cfe/trunk/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c -emit-llvm -g < %s | FileCheck "%s"
+// RUN: %clang_cc1 -x objective-c -emit-llvm -debug-info-kind=limited < %s | FileCheck "%s"
 // Test to check that subprogram start location.
 
 @interface Foo

Modified: cfe/trunk/test/CodeGenObjC/2010-02-23-DbgInheritance.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2010-02-23-DbgInheritance.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2010-02-23-DbgInheritance.m (original)
+++ cfe/trunk/test/CodeGenObjC/2010-02-23-DbgInheritance.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -g -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -debug-info-kind=limited -o - | FileCheck %s
 // CHECK-NOT: DW_TAG_member
 // Interface P should not be a member of interface I in debug info.
 @interface P 

Modified: cfe/trunk/test/CodeGenObjC/arc-linetable-autorelease.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-linetable-autorelease.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-linetable-autorelease.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-linetable-autorelease.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fobjc-arc -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fobjc-arc -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 // Ensure that the line info is making sense:
 // ARC cleanups should be at the closing '}'.
 @protocol NSObject

Modified: cfe/trunk/test/CodeGenObjC/arc-linetable.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-linetable.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-linetable.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-linetable.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fblocks -fobjc-arc -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fblocks -fobjc-arc -debug-info-kind=standalone -dwarf-version=4 -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 
 // Legend: EXP = Return expression, RET = ret instruction
 

Modified: cfe/trunk/test/CodeGenObjC/block-byref-debuginfo.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/block-byref-debuginfo.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/block-byref-debuginfo.m (original)
+++ cfe/trunk/test/CodeGenObjC/block-byref-debuginfo.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -g -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -debug-info-kind=limited -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s
 
 // rdar://problem/14386148
 // Test that the foo is aligned at an 8 byte boundary in the DWARF

Modified: cfe/trunk/test/CodeGenObjC/blocks-ivar-debug.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/blocks-ivar-debug.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/blocks-ivar-debug.m (original)
+++ cfe/trunk/test/CodeGenObjC/blocks-ivar-debug.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g %s -fblocks -S -o %t
+// RUN: %clang_cc1 -debug-info-kind=limited %s -fblocks -S -o %t
 // Radar 7959934
 
 @interface NSObject {

Modified: cfe/trunk/test/CodeGenObjC/catch-lexical-block.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/catch-lexical-block.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/catch-lexical-block.m (original)
+++ cfe/trunk/test/CodeGenObjC/catch-lexical-block.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -fobjc-exceptions -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -fobjc-exceptions -emit-llvm %s -o - | FileCheck %s
 @interface Foo @end
 void f0() {
   @try {

Modified: cfe/trunk/test/CodeGenObjC/debug-info-block-captured-self.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-block-captured-self.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-block-captured-self.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-block-captured-self.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -g -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
 //
 // Test that debug location is generated for a captured "self" inside
 // a block.

Modified: cfe/trunk/test/CodeGenObjC/debug-info-block-helper.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-block-helper.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-block-helper.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-block-helper.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fblocks -debug-info-kind=limited -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s -o - | FileCheck %s
 extern void foo(void(^)(void));
 
 // CHECK: !DISubprogram(name: "__destroy_helper_block_"

Modified: cfe/trunk/test/CodeGenObjC/debug-info-block-line.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-block-line.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-block-line.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-block-line.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -emit-llvm -fblocks -fobjc-arc -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fblocks -fobjc-arc -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 
 // rdar://11562117
 typedef unsigned int NSUInteger;

Modified: cfe/trunk/test/CodeGenObjC/debug-info-block-type.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-block-type.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-block-type.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-block-type.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fblocks -g  -triple x86_64-apple-darwin14 -x objective-c < %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fblocks -debug-info-kind=limited  -triple x86_64-apple-darwin14 -x objective-c < %s -o - | FileCheck %s
 #define nil ((void*) 0)
 typedef signed char BOOL;
 // CHECK: ![[BOOL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "BOOL"

Modified: cfe/trunk/test/CodeGenObjC/debug-info-blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-blocks.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-blocks.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-blocks.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fblocks -g  -triple x86_64-apple-darwin10 -fobjc-dispatch-method=mixed -x objective-c < %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fblocks -debug-info-kind=limited  -triple x86_64-apple-darwin10 -fobjc-dispatch-method=mixed -x objective-c < %s -o - | FileCheck %s
 
 // rdar://problem/9279956
 // Test that we generate the proper debug location for a captured self.

Modified: cfe/trunk/test/CodeGenObjC/debug-info-class-extension.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-class-extension.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-class-extension.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-class-extension.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: AT_APPLE_objc_complete_type
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-class-extension2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-class-extension2.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-class-extension2.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-class-extension2.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -debug-info-kind=limited %s -o - | FileCheck %s
 // CHECK: AT_APPLE_objc_complete_type
 
 @interface Foo {} @end

Modified: cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -masm-verbose -S -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK-NOT: AT_APPLE_objc_complete_type
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-crash-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-crash-2.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-crash-2.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-crash-2.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -g -S %s -o -
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -debug-info-kind=limited -S %s -o -
 // REQUIRES: x86-registered-target
 
 @class Bar;

Modified: cfe/trunk/test/CodeGenObjC/debug-info-crash.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-crash.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-crash.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-crash.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fblocks -g -S %s -o -
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fblocks -debug-info-kind=limited -S %s -o -
 
 // rdar://7556129
 @implementation test

Modified: cfe/trunk/test/CodeGenObjC/debug-info-default-synth-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-default-synth-ivar.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-default-synth-ivar.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-default-synth-ivar.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o %t 
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o %t
 // RUN: grep DW_TAG_member %t | count 5
 // rdar://8493239
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -fexceptions -fobjc-exceptions -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -fexceptions -fobjc-exceptions -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK:  !DISubprogram(name: "-[InstanceVariablesEverywhereButTheInterface someString]"
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-id-with-protocol.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-id-with-protocol.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-id-with-protocol.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-id-with-protocol.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 __attribute((objc_root_class)) @interface NSObject {
 	id isa;
 }

Modified: cfe/trunk/test/CodeGenObjC/debug-info-impl.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-impl.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-impl.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-impl.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -S -emit-llvm %s -o - | FileCheck %s
 @interface NSObject {
   struct objc_object *isa;
 }

Modified: cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-instancetype.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 // rdar://problem/13359718
 // Substitute the actual type for a method returning instancetype.
 @interface NSObject

Modified: cfe/trunk/test/CodeGenObjC/debug-info-ivars-extension.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-ivars-extension.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-ivars-extension.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-ivars-extension.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 // Make sure we generate debug symbols for ivars added by a class extension.
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-ivars-indirect.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-ivars-indirect.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-ivars-indirect.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-ivars-indirect.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 // Make sure we generate debug symbols for an indirectly referenced
 // extension to an interface.

Modified: cfe/trunk/test/CodeGenObjC/debug-info-ivars-private.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-ivars-private.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-ivars-private.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-ivars-private.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 // Debug symbols for private ivars. This test ensures that we are
 // generating debug info for ivars added by the implementation.

Modified: cfe/trunk/test/CodeGenObjC/debug-info-ivars.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-ivars.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-ivars.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-ivars.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 __attribute((objc_root_class)) @interface NSObject {
     id isa;

Modified: cfe/trunk/test/CodeGenObjC/debug-info-lifetime-crash.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-lifetime-crash.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-lifetime-crash.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-lifetime-crash.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple arm-apple-ios -emit-llvm -g -fblocks -fobjc-runtime=ios-7.0.0 -fobjc-arc %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm-apple-ios -emit-llvm -debug-info-kind=limited -fblocks -fobjc-runtime=ios-7.0.0 -fobjc-arc %s -o - | FileCheck %s
 // rdar://problem/14990656
 @protocol NSObject
 - (id)copy;

Modified: cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -g -S -o %t %s
+// RUN: %clang_cc1  -debug-info-kind=limited -S -o %t %s
 // RUN: not grep "001-[F bar" %t
 // Linkage name should not use 001 prefix in debug info.
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-nested-blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-nested-blocks.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-nested-blocks.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-nested-blocks.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -gdwarf-2 -fblocks -o - -x objective-c %s| FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -dwarf-version=2 -debug-info-kind=limited -fblocks -o - -x objective-c %s| FileCheck %s
 // This code triggered a bug where a dbg.declare intrinsic ended up with the
 // wrong parent and subsequently failed the Verifier.
 void baz(id b);

Modified: cfe/trunk/test/CodeGenObjC/debug-info-property-accessors.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-property-accessors.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-property-accessors.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-property-accessors.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -x objective-c -g -triple x86_64-apple-macosx10.8.0 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -x objective-c -debug-info-kind=limited -triple x86_64-apple-macosx10.8.0 %s -o - | FileCheck %s
 //
 // rdar://problem/14035789
 //

Modified: cfe/trunk/test/CodeGenObjC/debug-info-property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-property.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-property.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-property.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: AT_APPLE_property_name
 // CHECK: AT_APPLE_property_attribute

Modified: cfe/trunk/test/CodeGenObjC/debug-info-property2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-property2.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-property2.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-property2.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: AT_APPLE_property_name
 @interface C {

Modified: cfe/trunk/test/CodeGenObjC/debug-info-property3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-property3.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-property3.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-property3.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -S -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
 @interface I1
 // CHECK: !DIObjCProperty(name: "p1"

Modified: cfe/trunk/test/CodeGenObjC/debug-info-property4.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-property4.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-property4.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-property4.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: AT_APPLE_property_name
 // CHECK-NOT: AT_APPLE_property_getter

Modified: cfe/trunk/test/CodeGenObjC/debug-info-property5.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-property5.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-property5.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-property5.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK: AT_APPLE_property_name
 // CHECK: AT_APPLE_property_getter

Modified: cfe/trunk/test/CodeGenObjC/debug-info-pubtypes.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-pubtypes.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-pubtypes.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-pubtypes.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "H"
 // CHECK-SAME:             line: [[@LINE+1]],

Modified: cfe/trunk/test/CodeGenObjC/debug-info-selector.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-selector.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-selector.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-selector.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm  -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm  -debug-info-kind=limited %s -o - | FileCheck %s
 // Radar 8494540
 
 // CHECK: objc_selector

Modified: cfe/trunk/test/CodeGenObjC/debug-info-self.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-self.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-self.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-self.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=limited %s -o - | FileCheck %s
 // self and _cmd are marked as DW_AT_artificial. 
 // myarg is not marked as DW_AT_artificial.
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-static-var.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-static-var.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-static-var.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-static-var.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 // Radar 8801045
 // Do not emit AT_MIPS_linkage_name for static variable i
 

Modified: cfe/trunk/test/CodeGenObjC/debug-info-synthesis.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-synthesis.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-synthesis.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-synthesis.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -w -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -w -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
 # 1 "foo.m" 1
 # 1 "foo.m" 2
 # 1 "./foo.h" 1

Modified: cfe/trunk/test/CodeGenObjC/debug-info-variadic-method.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-variadic-method.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-variadic-method.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-variadic-method.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -o - -emit-llvm -g %s | FileCheck %s
+// RUN: %clang_cc1 -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s
 
 // This test verifies that variadic ObjC methods get the
 // DW_TAG_unspecified_parameter marker.

Modified: cfe/trunk/test/CodeGenObjC/debug-property-synth.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-property-synth.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-property-synth.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-property-synth.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 // rdar://problem/9468526
 //
 // Setting a breakpoint on a property should create breakpoints in

Modified: cfe/trunk/test/CodeGenObjC/debuginfo-properties.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debuginfo-properties.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debuginfo-properties.m (original)
+++ cfe/trunk/test/CodeGenObjC/debuginfo-properties.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
 // Check that we emit the correct method names for properties from a protocol.
 // rdar://problem/13798000
 @protocol NSObject

Modified: cfe/trunk/test/CodeGenObjC/layout-bitfield-crash.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/layout-bitfield-crash.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/layout-bitfield-crash.m (original)
+++ cfe/trunk/test/CodeGenObjC/layout-bitfield-crash.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-gc -emit-llvm -g -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-gc -emit-llvm -debug-info-kind=limited -o - %s
 // Check that this doesn't crash when compiled with debugging on.
 @class Foo;
 typedef struct Bar *BarRef;

Modified: cfe/trunk/test/CodeGenObjC/objc-fixed-enum.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc-fixed-enum.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc-fixed-enum.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc-fixed-enum.m Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 // The DWARF standard says the underlying data type of an enum may be
 // stored in an DW_AT_type entry in the enum DIE. This is useful to have
 // so the debugger knows about the signedness of the underlying type.

Modified: cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -g -emit-llvm -o - %s
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -g -emit-llvm -o - %s
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -g -emit-llvm -o - %s
-// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -g -emit-llvm -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -debug-info-kind=limited -emit-llvm -o - %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -debug-info-kind=limited -emit-llvm -o - %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -debug-info-kind=limited -emit-llvm -o - %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -debug-info-kind=limited -emit-llvm -o - %s
 
 // rdar://7252252
 @interface Loop {

Modified: cfe/trunk/test/CodeGenObjC/property-dbg.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/property-dbg.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/property-dbg.m (original)
+++ cfe/trunk/test/CodeGenObjC/property-dbg.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang_cc1 -triple %itanium_abi_triple -S -g -masm-verbose -x objective-c < %s | grep DW_AT_name
+// RUN: %clang_cc1 -triple %itanium_abi_triple -S -debug-info-kind=limited -masm-verbose -x objective-c < %s | grep DW_AT_name
 @interface Foo {
   int i;
 }

Modified: cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
 
 struct B {
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "B"

Modified: cfe/trunk/test/CodeGenObjCXX/debug-info-line.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/debug-info-line.mm?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/debug-info-line.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/debug-info-line.mm Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -gline-tables-only -fblocks -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -debug-info-kind=line-tables-only -fblocks -emit-llvm %s -o - | FileCheck %s
 
 void fn();
 

Modified: cfe/trunk/test/CodeGenObjCXX/debug-info.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/debug-info.mm?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/debug-info.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/debug-info.mm Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -emit-llvm %s -o /dev/null
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -emit-llvm %s -o /dev/null
 
 // This test passes if clang doesn't crash.
 

Modified: cfe/trunk/test/CodeGenObjCXX/nested-ehlocation.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/nested-ehlocation.mm?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/nested-ehlocation.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/nested-ehlocation.mm Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -triple x86_64-apple-macosx -emit-llvm -g -stdlib=libc++ -fblocks -fexceptions -x objective-c++ -o - %s | FileCheck %s
+// RUN: %clang_cc1  -triple x86_64-apple-macosx -emit-llvm -debug-info-kind=limited -stdlib=libc++ -fblocks -fexceptions -x objective-c++ -o - %s | FileCheck %s
 
 // Verify that all invoke instructions have a debug location.
 // Literally: There are no unwind lines that don't end with ", (!dbg 123)".

Modified: cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
 // PR 14474
 // RUN: %clang_cc1 -triple i386-apple-macosx10.6.0 -emit-llvm \
-// RUN:   -gline-tables-only -x objective-c++ -o /dev/null %s
+// RUN:   -debug-info-kind=line-tables-only -x objective-c++ -o /dev/null %s
 
 typedef signed char BOOL;
 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;

Modified: cfe/trunk/test/CodeGenObjCXX/property-objects.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-objects.mm?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-objects.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-objects.mm Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -g -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -debug-info-kind=limited -o - | FileCheck %s
 
 class S {
 public:

Modified: cfe/trunk/test/Coverage/codegen-next.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Coverage/codegen-next.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Coverage/codegen-next.m (original)
+++ cfe/trunk/test/Coverage/codegen-next.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -emit-llvm -fobjc-exceptions -triple x86_64-apple-darwin -o %t %s
-// RUN: %clang_cc1 -g -emit-llvm -fobjc-exceptions -triple x86_64-apple-darwin -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -fobjc-exceptions -triple x86_64-apple-darwin -o %t %s
 
 // An error could be seen for targeting x86_64-win32;
 //

Modified: cfe/trunk/test/Coverage/codegen.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Coverage/codegen.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Coverage/codegen.c (original)
+++ cfe/trunk/test/Coverage/codegen.c Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o %t %s
 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o %t %s
-// RUN: %clang_cc1 -triple i386-unknown-unknown -g -emit-llvm-bc -o %t %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -debug-info-kind=limited -emit-llvm-bc -o %t %s
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm-bc -o %t %s
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -g -emit-llvm-bc -o %t %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -debug-info-kind=limited -emit-llvm-bc -o %t %s
 
 #include "c-language-features.inc"

Modified: cfe/trunk/test/Coverage/targets.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Coverage/targets.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Coverage/targets.c (original)
+++ cfe/trunk/test/Coverage/targets.c Wed Oct  7 23:24:12 2015
@@ -1,19 +1,19 @@
-// RUN: %clang_cc1 -g -triple armv6-apple-darwin9 -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple armv6-unknown-unknown -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple i686-apple-darwin9 -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple i686-pc-linux-gnu -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple i686-unknown-dragonfly -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple i686-unknown-unknown -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple i686-unknown-win32 -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple powerpc-apple-darwin9 -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple powerpc-unknown-unknown -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple powerpc64-apple-darwin9 -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple powerpc64-unknown-unknown -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple sparc-unknown-solaris -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple sparc-unknown-unknown -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple x86_64-apple-darwin9 -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple x86_64-pc-linux-gnu -emit-llvm -o %t %s
-// RUN: %clang_cc1 -g -triple x86_64-unknown-unknown -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple armv6-apple-darwin9 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple armv6-unknown-unknown -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple i686-apple-darwin9 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple i686-pc-linux-gnu -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple i686-unknown-dragonfly -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple i686-unknown-unknown -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple i686-unknown-win32 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple powerpc-apple-darwin9 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple powerpc-unknown-unknown -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple powerpc64-apple-darwin9 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple powerpc64-unknown-unknown -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple sparc-unknown-solaris -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple sparc-unknown-unknown -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-apple-darwin9 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-pc-linux-gnu -emit-llvm -o %t %s
+// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-unknown -emit-llvm -o %t %s
 
 // <rdar://problem/7181838> clang 1.0 fails to compile Python 2.6
 // RUN: %clang -target x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4

Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Wed Oct  7 23:24:12 2015
@@ -365,17 +365,25 @@
 // ThreadSafeStatics-NOT: "-fno-threadsafe-statics"
 
 // RUN: %clang_cl /Zi /c -### -- %s 2>&1 | FileCheck -check-prefix=Zi %s
-// Zi: "-gline-tables-only"
 // Zi: "-gcodeview"
+// Zi: "-debug-info-kind=line-tables-only"
 
 // RUN: %clang_cl /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7 %s
-// Z7: "-gline-tables-only"
 // Z7: "-gcodeview"
+// Z7: "-debug-info-kind=line-tables-only"
 
+// This test was super sneaky: "/Z7" means "line-tables", but "-gdwarf" occurs
+// later on the command line, so it should win. Interestingly the cc1 arguments
+// came out right, but had wrong semantics, because an invariant assumed by
+// CompilerInvocation was violated: it expects that at most one of {gdwarfN,
+// line-tables-only} appear. If you assume that, then you can safely use
+// Args.hasArg to test whether a boolean flag is present without caring
+// where it appeared. And for this test, it appeared to the left of -gdwarf
+// which made it "win". This test could not detect that bug.
 // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
-// Z7_gdwarf: "-gline-tables-only"
 // Z7_gdwarf: "-gcodeview"
-// Z7_gdwarf: "-gdwarf-4"
+// Z7_gdwarf: "-debug-info-kind=limited"
+// Z7_gdwarf: "-dwarf-version=4"
 
 // RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s
 // CXX11: -std=c++11

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=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-g-opts.c (original)
+++ cfe/trunk/test/Driver/clang-g-opts.c Wed Oct  7 23:24:12 2015
@@ -1,14 +1,24 @@
 // RUN: %clang -### -S %s        2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
 // RUN: %clang -### -S %s -g -target x86_64-linux-gnu 2>&1 \
 // RUN:             | FileCheck --check-prefix=CHECK-WITH-G %s
+
+// Assert that the toolchains which should default to a lower Dwarf version do so.
 // RUN: %clang -### -S %s -g -target x86_64-apple-darwin 2>&1 \
 // RUN:             | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
 // RUN: %clang -### -S %s -g -target i686-pc-openbsd 2>&1 \
 // RUN:             | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
 // RUN: %clang -### -S %s -g -target x86_64-pc-freebsd10.0 2>&1 \
 // RUN:             | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
+
+// 'g0' is the default. Just sanity-test that it does nothing
 // RUN: %clang -### -S %s -g0    2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
+
+// And check that the last of -g or -g0 wins.
 // RUN: %clang -### -S %s -g -g0 2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
+
+// These should be semantically the same as not having given 'g0' at all,
+// as the last 'g' option wins.
+//
 // RUN: %clang -### -S %s -g0 -g -target x86_64-linux-gnu 2>&1 \
 // RUN:             | FileCheck --check-prefix=CHECK-WITH-G %s
 // RUN: %clang -### -S %s -g0 -g -target x86_64-apple-darwin 2>&1 \
@@ -20,7 +30,7 @@
 // RUN: %clang -### -S %s -g0 -g -target i386-pc-solaris 2>&1 \
 // RUN:             | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
 
-// CHECK-WITHOUT-G-NOT: "-g"
-// CHECK-WITH-G: "-g"
-// CHECK-WITH-G-DWARF2: "-gdwarf-2"
-
+// CHECK-WITHOUT-G-NOT: -debug-info-kind
+// CHECK-WITH-G: "-debug-info-kind=limited"
+// CHECK-WITH-G: "-dwarf-version=4"
+// CHECK-WITH-G-DWARF2: "-dwarf-version=2"

Modified: cfe/trunk/test/Driver/debug-options-as.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options-as.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Driver/debug-options-as.c (original)
+++ cfe/trunk/test/Driver/debug-options-as.c Wed Oct  7 23:24:12 2015
@@ -4,15 +4,18 @@
 // RUN: %clang -### -c -save-temps -integrated-as -g %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=SAVE %s
 //
+// SAVE: "-cc1"{{.*}}"-E"{{.*}}"-debug-info-kind=
+// SAVE: "-cc1"{{.*}}"-emit-llvm-bc"{{.*}}"-debug-info-kind=
+// SAVE: "-cc1"{{.*}}"-S"{{.*}}"-debug-info-kind=
 // SAVE: "-cc1as"
-// SAVE-NOT: "-g"
+// SAVE-NOT: -debug-info-kind=
 
 // Make sure that '-ggdb0' is not accidentally mistaken for '-g'
 // RUN: %clang -### -ggdb0 -c -integrated-as -x assembler %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=GGDB0 %s
 //
 // GGDB0: "-cc1as"
-// GGDB0-NOT: "-g"
+// GGDB0-NOT: -debug-info-kind=
 
 // Check to make sure clang with -g on a .s file gets passed.
 // rdar://9275556
@@ -20,7 +23,7 @@
 // RUN:   | FileCheck %s
 //
 // CHECK: "-cc1as"
-// CHECK: "-g"
+// CHECK: "-debug-info-kind=limited"
 
 // Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer.
 // rdar://12955296

Modified: cfe/trunk/test/Driver/debug-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Driver/debug-options.c (original)
+++ cfe/trunk/test/Driver/debug-options.c Wed Oct  7 23:24:12 2015
@@ -81,40 +81,36 @@
 // RUN:        | FileCheck -check-prefix=GEXTREFS %s
 //
 // G: "-cc1"
-// G: "-g"
+// G: "-debug-info-kind=limited"
 //
 // G_DARWIN: "-cc1"
-// G_DARWIN: "-gdwarf-2"
+// G_DARWIN: "-dwarf-version=2"
 //
 // G_D2: "-cc1"
-// G_D2: "-gdwarf-2"
+// G_D2: "-dwarf-version=2"
 //
 // G_NO: "-cc1"
-// G_NO-NOT: "-g"
+// G_NO-NOT: -debug-info-kind=
 //
 // GLTO_ONLY: "-cc1"
-// GLTO_ONLY-NOT: "-g"
-// GLTO_ONLY: "-gline-tables-only"
-// GLTO_ONLY-NOT: "-g"
+// GLTO_ONLY: "-debug-info-kind=line-tables-only"
 //
 // GLTO_ONLY_DWARF2: "-cc1"
-// GLTO_ONLY_DWARF2-NOT: "-g"
-// GLTO_ONLY_DWARF2: "-gline-tables-only"
-// GLTO_ONLY_DWARF2: "-gdwarf-2"
-// GLTO_ONLY_DWARF2-NOT: "-g"
+// GLTO_ONLY_DWARF2: "-debug-info-kind=line-tables-only"
+// GLTO_ONLY_DWARF2: "-dwarf-version=2"
 //
 // G_ONLY: "-cc1"
-// G_ONLY-NOT: "-gline-tables-only"
-// G_ONLY: "-g"
-// G_ONLY-NOT: "-gline-tables-only"
+// G_ONLY: "-debug-info-kind=limited"
 //
+// These tests assert that "-gline-tables-only" "-g" uses the latter,
+// but otherwise not caring about the DebugInfoKind.
 // G_ONLY_DWARF2: "-cc1"
-// G_ONLY_DWARF2-NOT: "-gline-tables-only"
-// G_ONLY_DWARF2: "-gdwarf-2"
-// G_ONLY_DWARF2-NOT: "-gline-tables-only"
+// G_ONLY_DWARF2: "-debug-info-kind={{standalone|limited}}"
+// G_ONLY_DWARF2: "-dwarf-version=2"
 //
+// This tests asserts that "-gline-tables-only" "-g0" disables debug info.
 // GLTO_NO: "-cc1"
-// GLTO_NO-NOT: "-gline-tables-only"
+// GLTO_NO-NOT: -debug-info-kind=
 //
 // GIGNORE-NOT: "argument unused during compilation"
 //
@@ -130,4 +126,4 @@
 //
 // NOCI-NOT: "-dwarf-column-info"
 //
-// GEXTREFS: "-g" "-dwarf-ext-refs" "-fmodule-format=obj"
+// GEXTREFS: "-dwarf-ext-refs" "-fmodule-format=obj" "-debug-info-kind=limited"

Modified: cfe/trunk/test/Driver/integrated-as.s
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/integrated-as.s?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Driver/integrated-as.s (original)
+++ cfe/trunk/test/Driver/integrated-as.s Wed Oct  7 23:24:12 2015
@@ -27,20 +27,23 @@
 // XA_INCLUDE2: "-Ifoo_dir"
 
 // RUN: %clang -### -c -integrated-as %s -gdwarf-4 -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2 %s
-// DWARF2: "-g" "-gdwarf-2"
-// DWARF2-NOT: "-gdwarf-4"
+// DWARF2: "-debug-info-kind=limited" "-dwarf-version=2"
 
 // RUN: %clang -### -c -integrated-as %s -gdwarf-3 2>&1 | FileCheck --check-prefix=DWARF3 %s
-// DWARF3: "-g" "-gdwarf-3"
+// DWARF3: "-debug-info-kind=limited" "-dwarf-version=3"
 
 // RUN: %clang -### -c -integrated-as %s -gdwarf-4 2>&1 | FileCheck --check-prefix=DWARF4 %s
-// DWARF4: "-g" "-gdwarf-4"
+// DWARF4: "-debug-info-kind=limited" "-dwarf-version=4"
 
 // RUN: %clang -### -c -integrated-as %s -Xassembler -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2XASSEMBLER %s
-// DWARF2XASSEMBLER: "-gdwarf-2"
+// DWARF2XASSEMBLER: "-debug-info-kind=limited" "-dwarf-version=2"
 
 // RUN: %clang -### -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s
-// DWARF2WA: "-gdwarf-2"
+// DWARF2WA: "-debug-info-kind=limited" "-dwarf-version=2"
+
+// A dwarf version number that driver can't parse is just stuffed in.
+// RUN: %clang -### -c -integrated-as %s -Wa,-gdwarf-huh 2>&1 | FileCheck --check-prefix=BOGODWARF %s
+// BOGODWARF: "-gdwarf-huh"
 
 // RUN: %clang -### -x assembler -c -integrated-as %s -I myincludedir 2>&1 | FileCheck --check-prefix=INCLUDEPATH %s
 // INCLUDEPATH: "-I" "myincludedir"

Modified: cfe/trunk/test/Driver/split-debug.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/split-debug.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Driver/split-debug.c (original)
+++ cfe/trunk/test/Driver/split-debug.c Wed Oct  7 23:24:12 2015
@@ -36,16 +36,12 @@
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -S -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-GMLT-OVER-SPLIT < %t %s
 //
-// CHECK-GMLT-OVER-SPLIT: "-gline-tables-only"
-// CHECK-GMLT-OVER-SPLIT-NOT: "-g"
+// CHECK-GMLT-OVER-SPLIT: "-debug-info-kind=line-tables-only"
 // CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf=Enable"
 // CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-file"
 
 // RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -S -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-GMLT < %t %s
 //
-// CHECK-SPLIT-OVER-GMLT-NOT: "-gline-tables-only"
-// CHECK-SPLIT-OVER-GMLT: "-g"
-// CHECK-SPLIT-OVER-GMLT: "-split-dwarf=Enable"
+// CHECK-SPLIT-OVER-GMLT: "-split-dwarf=Enable" "-debug-info-kind=limited"
 // CHECK-SPLIT-OVER-GMLT: "-split-dwarf-file"
-// CHECK-SPLIT-OVER-GMLT-NOT: "-gline-tables-only"

Modified: cfe/trunk/test/Frontend/optimization-remark-line-directive.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/optimization-remark-line-directive.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/optimization-remark-line-directive.c (original)
+++ cfe/trunk/test/Frontend/optimization-remark-line-directive.c Wed Oct  7 23:24:12 2015
@@ -2,7 +2,7 @@
 // directives. We cannot map #line directives back to
 // a SourceLocation.
 
-// RUN: %clang_cc1 %s -Rpass=inline -gline-tables-only -dwarf-column-info -emit-llvm-only -verify
+// RUN: %clang_cc1 %s -Rpass=inline -debug-info-kind=line-tables-only -dwarf-column-info -emit-llvm-only -verify
 
 int foo(int x, int y) __attribute__((always_inline));
 int foo(int x, int y) { return x + y; }

Modified: cfe/trunk/test/Frontend/optimization-remark.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/optimization-remark.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/optimization-remark.c (original)
+++ cfe/trunk/test/Frontend/optimization-remark.c Wed Oct  7 23:24:12 2015
@@ -4,7 +4,7 @@
 // optimization level.
 
 // RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -verify
-// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -gline-tables-only -verify
+// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -debug-info-kind=line-tables-only -verify
 // RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>/dev/null | FileCheck %s
 //
 // Check that we can override -Rpass= with -Rno-pass.

Modified: cfe/trunk/test/Misc/backend-optimization-failure.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/backend-optimization-failure.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Misc/backend-optimization-failure.cpp (original)
+++ cfe/trunk/test/Misc/backend-optimization-failure.cpp Wed Oct  7 23:24:12 2015
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -O3 -emit-llvm -gline-tables-only -S -verify -o /dev/null
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -O3 -emit-llvm -debug-info-kind=line-tables-only -S -verify -o /dev/null
 // REQUIRES: x86-registered-target
 
 // Test verifies optimization failures generated by the backend are handled

Modified: cfe/trunk/test/Modules/DebugInfoSubmoduleImport.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/DebugInfoSubmoduleImport.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/DebugInfoSubmoduleImport.c (original)
+++ cfe/trunk/test/Modules/DebugInfoSubmoduleImport.c Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -fmodule-format=obj -g -dwarf-ext-refs \
+// RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \
 // RUN:     -fimplicit-module-maps -x c -fmodules-cache-path=%t -I %S/Inputs \
 // RUN:     %s -emit-llvm -o - | FileCheck %s
 #include "DebugSubmoduleA.h"

Modified: cfe/trunk/test/Modules/DebugInfoSubmodules.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/DebugInfoSubmodules.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/DebugInfoSubmodules.c (original)
+++ cfe/trunk/test/Modules/DebugInfoSubmodules.c Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -fmodule-format=obj -g -dwarf-ext-refs \
+// RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \
 // RUN:     -fimplicit-module-maps -x c -fmodules-cache-path=%t -I %S/Inputs \
 // RUN:     %s -mllvm -debug-only=pchcontainer -emit-llvm -o %t.ll \
 // RUN:     2>&1 | FileCheck %s

Modified: cfe/trunk/test/Modules/DebugInfoTransitiveImport.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/DebugInfoTransitiveImport.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/DebugInfoTransitiveImport.m (original)
+++ cfe/trunk/test/Modules/DebugInfoTransitiveImport.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -fmodule-format=obj -g -dwarf-ext-refs \
+// RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \
 // RUN:     -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs \
 // RUN:     %s -mllvm -debug-only=pchcontainer 2>&1 | FileCheck %s
 // REQUIRES: asserts

Modified: cfe/trunk/test/Modules/ExtDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/ExtDebugInfo.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/ExtDebugInfo.cpp (original)
+++ cfe/trunk/test/Modules/ExtDebugInfo.cpp Wed Oct  7 23:24:12 2015
@@ -2,7 +2,7 @@
 // Test that only forward declarations are emitted for types dfined in modules.
 
 // Modules:
-// RUN: %clang_cc1 -x objective-c++ -std=c++11 -g -dwarf-ext-refs -fmodules \
+// RUN: %clang_cc1 -x objective-c++ -std=c++11 -debug-info-kind=limited -dwarf-ext-refs -fmodules \
 // RUN:     -fmodule-format=obj -fimplicit-module-maps -DMODULES \
 // RUN:     -triple %itanium_abi_triple \
 // RUN:     -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t-mod.ll
@@ -12,7 +12,7 @@
 // RUN: %clang_cc1 -x c++ -std=c++11 -fmodule-format=obj -emit-pch -I%S/Inputs \
 // RUN:     -triple %itanium_abi_triple \
 // RUN:     -o %t.pch %S/Inputs/DebugCXX.h
-// RUN: %clang_cc1 -std=c++11 -g -dwarf-ext-refs -fmodule-format=obj \
+// RUN: %clang_cc1 -std=c++11 -debug-info-kind=limited -dwarf-ext-refs -fmodule-format=obj \
 // RUN:     -triple %itanium_abi_triple \
 // RUN:     -include-pch %t.pch %s -emit-llvm -o %t-pch.ll %s
 // RUN: cat %t-pch.ll |  FileCheck %s

Modified: cfe/trunk/test/Modules/ExtDebugInfo.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/ExtDebugInfo.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/ExtDebugInfo.m (original)
+++ cfe/trunk/test/Modules/ExtDebugInfo.m Wed Oct  7 23:24:12 2015
@@ -2,7 +2,7 @@
 // Test that only forward declarations are emitted for types defined in modules.
 
 // Modules:
-// RUN: %clang_cc1 -x objective-c -g -dwarf-ext-refs -fmodules \
+// RUN: %clang_cc1 -x objective-c -debug-info-kind=limited -dwarf-ext-refs -fmodules \
 // RUN:     -fmodule-format=obj -fimplicit-module-maps -DMODULES \
 // RUN:     -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t-mod.ll
 // RUN: cat %t-mod.ll |  FileCheck %s
@@ -10,7 +10,7 @@
 // PCH:
 // RUN: %clang_cc1 -x objective-c -fmodule-format=obj -emit-pch -I%S/Inputs \
 // RUN:     -o %t.pch %S/Inputs/DebugObjC.h
-// RUN: %clang_cc1 -x objective-c -g -dwarf-ext-refs -fmodule-format=obj \
+// RUN: %clang_cc1 -x objective-c -debug-info-kind=limited -dwarf-ext-refs -fmodule-format=obj \
 // RUN:     -include-pch %t.pch %s -emit-llvm -o %t-pch.ll %s
 // RUN: cat %t-pch.ll |  FileCheck %s
 

Modified: cfe/trunk/test/Modules/ModuleDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/ModuleDebugInfo.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/ModuleDebugInfo.cpp (original)
+++ cfe/trunk/test/Modules/ModuleDebugInfo.cpp Wed Oct  7 23:24:12 2015
@@ -5,7 +5,7 @@
 
 // Modules:
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 -g -fmodules -fmodule-format=obj -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer &>%t-mod.ll
+// RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 -debug-info-kind=limited -fmodules -fmodule-format=obj -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer &>%t-mod.ll
 // RUN: cat %t-mod.ll | FileCheck %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-DWO %s

Modified: cfe/trunk/test/Modules/cxx-irgen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/cxx-irgen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/cxx-irgen.cpp (original)
+++ cfe/trunk/test/Modules/cxx-irgen.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
 // RUN: rm -rf %t
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -g -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
 // FIXME: When we have a syntax for modules in C++, use that.
 
 @import cxx_irgen_top;

Modified: cfe/trunk/test/Modules/debug-info-moduleimport.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/debug-info-moduleimport.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Modules/debug-info-moduleimport.m (original)
+++ cfe/trunk/test/Modules/debug-info-moduleimport.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -g -fmodules -DGREETING="Hello World" -UNDEBUG -fimplicit-module-maps -fmodules-cache-path=%t %s -I %S/Inputs -isysroot /tmp/.. -I %t -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -fmodules -DGREETING="Hello World" -UNDEBUG -fimplicit-module-maps -fmodules-cache-path=%t %s -I %S/Inputs -isysroot /tmp/.. -I %t -emit-llvm -o - | FileCheck %s
 
 // CHECK: ![[CU:.*]] = distinct !DICompileUnit
 @import DebugObjC;
@@ -11,13 +11,13 @@
 // CHECK-SAME:  isysroot: "/tmp/..")
 
 
-// RUN: %clang_cc1 -g -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
+// RUN: %clang_cc1 -debug-info-kind=limited -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
 // RUN:   %s -I %S/Inputs -isysroot /tmp/.. -I %t -emit-llvm -o - \
 // RUN:     | FileCheck %s --check-prefix=NO-SKEL-CHECK
 // NO-SKEL-CHECK: distinct !DICompileUnit
 // NO-SKEL-CHECK-NOT: distinct !DICompileUnit
 
-// RUN: %clang_cc1 -g -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
+// RUN: %clang_cc1 -debug-info-kind=limited -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
 // RUN:   -fmodule-format=obj -dwarf-ext-refs \
 // RUN:   %s -I %S/Inputs -isysroot /tmp/.. -I %t -emit-llvm -o - \
 // RUN:     | FileCheck %s --check-prefix=SKEL-CHECK

Modified: cfe/trunk/test/OpenMP/atomic_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/atomic_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/atomic_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/atomic_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -x c++ -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // expected-no-diagnostics
 
 int a;

Modified: cfe/trunk/test/OpenMP/critical_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/critical_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/critical_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/critical_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target
 #ifndef HEADER

Modified: cfe/trunk/test/OpenMP/flush_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/flush_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/flush_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/flush_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target
 #ifndef HEADER

Modified: cfe/trunk/test/OpenMP/for_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/for_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 //
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target

Modified: cfe/trunk/test/OpenMP/for_simd_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm -fexceptions -fcxx-exceptions -o - < %s | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t < %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify -emit-llvm -o - < %s | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm -o - < %s | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics
 #ifndef HEADER
@@ -683,4 +683,3 @@ void parallel_simd(float *a) {
 }
 // TERM_DEBUG: !{{[0-9]+}} = !DILocation(line: [[@LINE-11]],
 #endif // HEADER
-

Modified: cfe/trunk/test/OpenMP/master_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/master_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/master_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/master_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target
 #ifndef HEADER

Modified: cfe/trunk/test/OpenMP/parallel_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -emit-llvm %s -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=CHECK-DEBUG %s
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=CHECK-DEBUG %s
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target
 #ifndef HEADER

Modified: cfe/trunk/test/OpenMP/parallel_for_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -O1 -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=CLEANUP
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics

Modified: cfe/trunk/test/OpenMP/parallel_for_simd_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics
 #ifndef HEADER

Modified: cfe/trunk/test/OpenMP/simd_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics
 #ifndef HEADER

Modified: cfe/trunk/test/OpenMP/single_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/single_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/single_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/single_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fnoopenmp-use-tls -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fnoopenmp-use-tls -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // RUN: %clang_cc1 -verify -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=ARRAY %s
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target

Modified: cfe/trunk/test/OpenMP/taskgroup_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskgroup_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskgroup_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/taskgroup_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target
 #ifndef HEADER

Modified: cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/threadprivate_codegen.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/threadprivate_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/threadprivate_codegen.cpp Wed Oct  7 23:24:12 2015
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -verify -fopenmp -fnoopenmp-use-tls -DBODY -triple x86_64-unknown-unknown -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -DBODY -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=CHECK-DEBUG %s
+// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -DBODY -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=CHECK-DEBUG %s
 
 // RUN: %clang_cc1 -verify -fopenmp -DBODY -triple x86_64-unknown-unknown -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK-TLS
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -DBODY -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=CHECK-TLS %s
+// RUN: %clang_cc1 -fopenmp -DBODY -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=CHECK-TLS %s
 
 // expected-no-diagnostics
 // REQUIRES: x86-registered-target

Modified: cfe/trunk/test/PCH/debug-info-limited-struct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/debug-info-limited-struct.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/PCH/debug-info-limited-struct.c (original)
+++ cfe/trunk/test/PCH/debug-info-limited-struct.c Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -emit-pch -o %t %S/debug-info-limited-struct.h
-// RUN: %clang_cc1 -include-pch %t -emit-llvm %s -g -o - | FileCheck %s
+// RUN: %clang_cc1 -include-pch %t -emit-llvm %s -debug-info-kind=limited -o - | FileCheck %s
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
 // CHECK-NOT:              flags: {{[^,]*}}FlagFwdDecl

Modified: cfe/trunk/test/PCH/pending-ids.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/pending-ids.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/PCH/pending-ids.m (original)
+++ cfe/trunk/test/PCH/pending-ids.m Wed Oct  7 23:24:12 2015
@@ -5,7 +5,7 @@
 
 // With PCH
 // RUN: %clang_cc1 %s -emit-pch -o %t
-// RUN: %clang_cc1 -emit-llvm-only -verify %s -include-pch %t -g
+// RUN: %clang_cc1 -emit-llvm-only -verify %s -include-pch %t -debug-info-kind=limited
 
 // expected-no-diagnostics
 

Modified: cfe/trunk/test/Rewriter/line-generation-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/line-generation-test.m?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/line-generation-test.m (original)
+++ cfe/trunk/test/Rewriter/line-generation-test.m Wed Oct  7 23:24:12 2015
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -E %s -o %t.mm
-// RUN: %clang_cc1 -fms-extensions -rewrite-objc -g %t.mm -o %t-rw.cpp
+// RUN: %clang_cc1 -fms-extensions -rewrite-objc -debug-info-kind=limited %t.mm -o %t-rw.cpp
 // RUN: FileCheck  -check-prefix CHECK-LINE --input-file=%t-rw.cpp %s
 // RUN: %clang_cc1 -fms-extensions -rewrite-objc %t.mm -o %t-rwnog.cpp
 // RUN: FileCheck  -check-prefix CHECK-NOLINE --input-file=%t-rwnog.cpp %s

Modified: cfe/trunk/test/VFS/external-names.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/VFS/external-names.c?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/test/VFS/external-names.c (original)
+++ cfe/trunk/test/VFS/external-names.c Wed Oct  7 23:24:12 2015
@@ -27,9 +27,9 @@
 ////
 // Debug info
 
-// RUN: %clang_cc1 -I %t -ivfsoverlay %t.external.yaml -triple %itanium_abi_triple -g -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG-EXTERNAL %s
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.external.yaml -triple %itanium_abi_triple -debug-info-kind=limited -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG-EXTERNAL %s
 // CHECK-DEBUG-EXTERNAL: !DISubprogram({{.*}}file: ![[Num:[0-9]+]]
 // CHECK-DEBUG-EXTERNAL: ![[Num]] = !DIFile(filename: "{{[^"]*}}Inputs{{.}}external-names.h"
 
-// RUN: %clang_cc1 -I %t -ivfsoverlay %t.yaml -triple %itanium_abi_triple -g -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG %s
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.yaml -triple %itanium_abi_triple -debug-info-kind=limited -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG %s
 // CHECK-DEBUG-NOT: Inputs

Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=249655&r1=249654&r2=249655&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Wed Oct  7 23:24:12 2015
@@ -195,14 +195,10 @@ bool AssemblerInvocation::CreateFromArgs
   Opts.IncludePaths = Args.getAllArgValues(OPT_I);
   Opts.NoInitialTextSection = Args.hasArg(OPT_n);
   Opts.SaveTemporaryLabels = Args.hasArg(OPT_msave_temp_labels);
-  Opts.GenDwarfForAssembly = Args.hasArg(OPT_g_Flag);
+  // Any DebugInfoKind implies GenDwarfForAssembly.
+  Opts.GenDwarfForAssembly = Args.hasArg(OPT_debug_info_kind_EQ);
   Opts.CompressDebugSections = Args.hasArg(OPT_compress_debug_sections);
-  if (Args.hasArg(OPT_gdwarf_2))
-    Opts.DwarfVersion = 2;
-  if (Args.hasArg(OPT_gdwarf_3))
-    Opts.DwarfVersion = 3;
-  if (Args.hasArg(OPT_gdwarf_4))
-    Opts.DwarfVersion = 4;
+  Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 0, Diags);
   Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
   Opts.DwarfDebugProducer = Args.getLastArgValue(OPT_dwarf_debug_producer);
   Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir);
@@ -511,4 +507,3 @@ int cc1as_main(ArrayRef<const char *> Ar
 
   return !!Failed;
 }
-




More information about the cfe-commits mailing list