[PATCH] D11742: Add -gcodeview and -gdwarf to control which type Clang emits
Hans Wennborg
hans at chromium.org
Mon Aug 3 18:04:48 PDT 2015
hans added inline comments.
================
Comment at: lib/Driver/Tools.cpp:5276
@@ +5275,3 @@
+ // Emit CodeView if -Z7 is present.
+ if (Args.hasFlag(options::OPT__SLASH_Z7, options::OPT_INVALID, false)) {
+ CmdArgs.push_back("-gline-tables-only");
----------------
Would just Args.hasArg(options::OPT__SLASH_Z7) work?
================
Comment at: test/CodeGen/dwarf-version.c:11
@@ -7,3 +10,3 @@
// RUN: %clang -target powerpc-unknown-freebsd -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
// RUN: %clang -target i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
int main (void) {
----------------
Maybe add %clang_cl invocations here?
================
Comment at: test/Driver/cl-options.c:365
@@ +364,3 @@
+// Z7: "-gline-tables-only"
+// Z7: "-gcodeview"
+
----------------
Is there a test for /Zi in here to update as well?
================
Comment at: test/Driver/cl-options.c:373
@@ -368,3 +372,3 @@
// Accept "core" clang options.
// (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)
----------------
Not sure if this list is exhaustive anymore, but might still be worth adding -gdwarf and -gcodeview here to codify that they're supposed to be exposed in clang-cl.
http://reviews.llvm.org/D11742
More information about the cfe-commits
mailing list