]> granicus.if.org Git - clang/commitdiff
[clang-cl] /Z7 now generates normal debug info, not just line info
authorReid Kleckner <rnk@google.com>
Wed, 10 Feb 2016 21:28:38 +0000 (21:28 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 10 Feb 2016 21:28:38 +0000 (21:28 +0000)
Previously LLVM could not process any debug info we produced, so it
didn't make sense to spend time generating it. Now that it has primitive
support for local variable info, it does make sense to generate normal
debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260435 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Driver/cl-options.c

index eb0b78a58000fc0d398e44a9d797d9dc7591b6d2..612fe3b9ae6609194169078e2634234180a1b3d6 100644 (file)
@@ -5890,11 +5890,8 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs,
 
   // Emit CodeView if -Z7 is present.
   *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)
-    *DebugInfoKind = codegenoptions::DebugLineTablesOnly;
+  if (*EmitCodeView)
+    *DebugInfoKind = codegenoptions::LimitedDebugInfo;
   if (*EmitCodeView)
     CmdArgs.push_back("-gcodeview");
 
index 6054faaf158ded736ed16ad7ad91cb8064b6dae8..5743044a38b57fc29698f868080f0b6dfc1ade35 100644 (file)
 
 // RUN: %clang_cl /Zi /c -### -- %s 2>&1 | FileCheck -check-prefix=Zi %s
 // Zi: "-gcodeview"
-// Zi: "-debug-info-kind=line-tables-only"
+// Zi: "-debug-info-kind=limited"
 
 // RUN: %clang_cl /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7 %s
 // Z7: "-gcodeview"
-// Z7: "-debug-info-kind=line-tables-only"
+// Z7: "-debug-info-kind=limited"
 
 // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=BreproDefault %s
 // BreproDefault: "-mincremental-linker-compatible"