[PATCH] D157794: [Driver] Make /Zi and /Z7 aliases of -g rather than handling them specially

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 12 17:07:31 PDT 2023


rnk added a subscriber: smeenai.
rnk added inline comments.


================
Comment at: clang/test/Driver/cl-options.c:567
 
-// 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.
+// If We specify both /Z7 and -gdwarf we should get dwarf, not codeview.
 // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
----------------
I think Meta folks depend on a mode that emits both codeview and DWARF. + at smeenai


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157794/new/

https://reviews.llvm.org/D157794



More information about the cfe-commits mailing list