Allow the GNU .debug_macro extension to be parsed and printed by
llvm-dwarfdump. In an upcoming patch support will be added for emitting
that format also.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | ||
---|---|---|
3055–3059 ↗ | (On Diff #274832) | I'd probably inline the lambda into the call expression - it's short/simple enough. |
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | ||
535 ↗ | (On Diff #274832) | Probably llvm::function_ref here, since the functor doesn't escape the callee |
llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp | ||
---|---|---|
57 | If this is written like << (Macros.Header.Version < 5 ? GnuMacroString(E.type) : MacroString(E.type)) ; then llvm::dwarf::MacroString() can be left as is and most of the changes are not needed. |
Address comments.
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | ||
---|---|---|
3055–3059 ↗ | (On Diff #274832) | This change is now removed. I'll inline the expression in the follow-up patch. |
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | ||
535 ↗ | (On Diff #274832) | Yes, thanks! Since I moved out the GNU defines to a separate GnuMacroString() function this change is done in the patch which introduces emission of the extension. |
llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp | ||
57 | Yes, thanks! Since there are so few uses where we conditionally want to select either the DWARF or GNU defines that seems cleaner. |
If this is written like
then llvm::dwarf::MacroString() can be left as is and most of the changes are not needed.