[PATCH] D58750: [DWARF] Make -g with empty assembler source work better.
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 28 07:38:21 PST 2019
probinson marked 2 inline comments as done.
probinson added inline comments.
================
Comment at: clang/tools/driver/cc1as_main.cpp:336
+ // We may need this handle later.
+ StringRef BufferRef = Buffer->get()->getBuffer();
----------------
aprantl wrote:
> Why not move this to line 411?
Because on line 341, we `std::move(*Buffer)` into SrcMgr. I could try to figure out how to extract it from SrcMgr afterward, I guess.
================
Comment at: llvm/lib/MC/MCDwarf.cpp:1018
+ ? context.getMCDwarfLineTable(/*CUID=*/0).getRootFile()
+ : MCDwarfFiles[1];
+ MCOS->EmitBytes(RootFile.Name);
----------------
aprantl wrote:
> Are there guaranteed to be >1 MCDwarfFiles?
Yes, because MCDwarfFiles[0] is never used. If it's non-empty, size will be at least 2. I could expand on the comment to say so; there's another place where I have a comment like that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58750/new/
https://reviews.llvm.org/D58750
More information about the llvm-commits
mailing list