probinson added inline comments.
================ Comment at: lib/Driver/ToolChains/Clang.cpp:5889 const llvm::Triple &T = getToolChain().getTriple(); - if (Args.hasArg(options::OPT_gsplit_dwarf) && + if ((getDebugFissionKind(D, Args) == DwarfFissionKind::Split) && (T.isOSLinux() || T.isOSFuchsia())) { ---------------- grimar wrote: > dblaikie wrote: > > Could having more than one call to getDebugFissionKind lead to the error > > message (for -fdwarf-fission=garbage) being printed multiple times? Or is > > this call on a distinct/mutually exclusive codepath to the other? > I think it should not be possible. Currently, there are 2 inclusions of the > `getDebugFissionKind `. One is used for construction clang job, > and one is here, it is used to construct an assembler tool job. I do not see > a way how it can be printed multiple times. > > For example, the following invocation will print it only once: > > ``` > clang main.c -o out.s -S -fdwarf-fission=foo > clang-8: error: unsupported argument 'foo' to option 'fdwarf-fission=' > ``` The example you give here will not create an assembler job. Try `clang main.c -fdwarf-fission=foo -fno-integrated-as` which I think will exercise the path David is asking about. https://reviews.llvm.org/D52296 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits