tejohnson added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3758
+  // Normally -gsplit-dwarf is only useful with -gN. For -gsplit-dwarf in the
+  // backend phase of a distributed ThinLTO which does object file generation
+  // and no IR generation, -gN should not be needed. So allow -gsplit-dwarf 
with
----------------
MaskRay wrote:
> dblaikie wrote:
> > tejohnson wrote:
> > > Better to simply check if the input type is IR/BC via 
> > > types::isLLVMIR(Input.getType()). Technically you don't need ThinLTO to 
> > > do a clang compile with bitcode input. Looks like Input can be passed 
> > > down from the caller.
> > Good point! +1 to that.
> That currently does not work:
> `clang -g -c -flto a.c; fclang -gsplit-dwarf -g a.o -o a`
> there is no .dwo
I assume you mean clang and not "fclang"?

Try with "-x ir" like "clang -gsplit-dwarf -g -x ir a.o -o a". I thought that 
the -x ir was needed when passing a .o file that was actually bitcode?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94647

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to