[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 6 15:02:36 PDT 2023


yaxunl added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1274
   if (Arg *A = Args.getLastArg(options::OPT_gsplit_dwarf_EQ))
-    if (StringRef(A->getValue()) == "single")
+    if (StringRef(A->getValue()) == "single" && Output.isFilename())
       return Args.MakeArgString(Output.getFilename());
----------------
I am wondering in what situation the Output here is not a file name. Is it possible to have a lit test for this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154602



More information about the cfe-commits mailing list