bogner 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 ---------------- rnk wrote: > I think Meta folks depend on a mode that emits both codeview and DWARF. > +@smeenai Hopefully if that's the case there's a better test somewhere than this one that discusses in detail how `/Z7` is an alias for `-gline-tables-only`, which hasn't been true since 2017. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157794/new/ https://reviews.llvm.org/D157794 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits