[PATCH] D95893: [CodeView][DebugInfo] Update the code for removing template arguments from the display name of a codeview function id.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 14:26:50 PST 2021


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:388-389
 
   // The display name includes function template arguments. Drop them to match
   // MSVC.
+  StringRef DisplayName = removeTemplateArgs(SP->getName());
----------------
I had to go remind myself why we don't do this in the frontend. The reason is that we put the template arguments in the `S_GPROC32` symbol records, but we don't put them in the `LF_FUNC_ID` records. Can you update this comment to explain why we have to throw away the template arguments here? If we really wanted this to be super clean, we could change DISubprogram to split the name into the basename and the template argument list string, but that seems unnecessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95893



More information about the llvm-commits mailing list