[PATCH] D48055: [DWARFv5] llvm-mc -dwarf-version does not imply -g.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 12 09:11:58 PDT 2018


probinson marked an inline comment as done.
probinson added a comment.

In https://reviews.llvm.org/D48055#1129175, @aprantl wrote:

> So llvm-mc performs a literal translation by default and with -g it generates debug info for the assembler input? Seems reasonable.


Yes, that has been the behavior for some time, imitating the GNU assembler interface.
I stumbled over this while working on PR37623, and it was simpler to do this part first.



================
Comment at: llvm/lib/MC/MCDwarf.cpp:392
+  // Try not to emit an empty compilation directory.
+  const StringRef *CompDir =
+      CompilationDir.empty() ? &CtxCompilationDir : &CompilationDir;
----------------
aprantl wrote:
> Could this be a `const StringRef &`?
Indeed it can!


Repository:
  rL LLVM

https://reviews.llvm.org/D48055





More information about the llvm-commits mailing list