[PATCH] D82974: [DebugInfo] Allow GNU macro extension to be read
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 14:04:26 PDT 2020
dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:3055-3059
+ auto FormToString = [](unsigned Form) {
+ return dwarf::MacroString(Form, /*GNU=*/false);
+ };
emitMacroFileImpl(F, U, dwarf::DW_MACRO_start_file,
+ dwarf::DW_MACRO_end_file, FormToString);
----------------
I'd probably inline the lambda into the call expression - it's short/simple enough.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:535
+ unsigned EndFile,
+ std::function<StringRef(unsigned Form)> MacroFormToString);
void handleMacroNodes(DIMacroNodeArray Nodes, DwarfCompileUnit &U);
----------------
Probably llvm::function_ref here, since the functor doesn't escape the callee
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82974/new/
https://reviews.llvm.org/D82974
More information about the llvm-commits
mailing list