[PATCH] D80381: Fix debug line info when line markers are present inside macros.

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 09:09:07 PDT 2020


thopre added inline comments.


================
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:1705
+      return parseCppHashLineFilenameComment(IDLoc);
+    // Eat the line marker.
+    Lex();
----------------
Is there code inside parseCppHashLineFilenameComment that could be hoisted out in a separate function that could be used here? If not, maybe you could create a function anyway which would make the code here smaller and more obvious.

Might be nice having in the heading comment for that function the format of a line marker: # linenum filename flags. I don't know if it's customary to refer to documentation for a format when it's an online page, but if it is you could mention https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html in that heading comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80381





More information about the llvm-commits mailing list