[llvm] 498e37e - [DebugInfo]: Added DWARFv5 macro header flags and corresponding helper
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 21:56:48 PDT 2020
No, no need to recommit, but just a "for future reference, please link to
where the review/approval was" (even if it's a casual "Oh, just commit that
separately without further review" in some other review/discussion)
On Sun, Mar 22, 2020 at 9:55 PM Tomar, Sourabh Singh <
SourabhSingh.Tomar at amd.com> wrote:
> [AMD Official Use Only - Internal Distribution Only]
>
>
>
> Hi David,
>
>
>
> Are you suggesting here to revert and re-commit with included Differential
> Revision URL: ?
>
> Admittedly this can’t be trace back to D72828, but their in D72828 I’ve
> explicitly mentioned this with commit id when I committed these changes.
>
>
>
> --Sourabh
>
> *From:* David Blaikie <dblaikie at gmail.com>
> *Sent:* Monday, March 23, 2020 9:23 AM
> *To:* Tomar, Sourabh Singh <SourabhSingh.Tomar at amd.com>; Sourabh Singh
> Tomar <llvmlistbot at llvm.org>
> *Cc:* llvm-commits <llvm-commits at lists.llvm.org>
> *Subject:* Re: [llvm] 498e37e - [DebugInfo]: Added DWARFv5 macro header
> flags and corresponding helper
>
>
>
> [CAUTION: External Email]
>
> (this seems fine & I Guess it was approved as a spin-off from another
> review - but could you ensure the Differential Revision field is included
> so commits can be traced back to their review, etc?
>
>
>
> On Sat, Mar 7, 2020 at 4:23 AM Sourabh Singh Tomar via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Sourabh Singh Tomar
> Date: 2020-03-07T17:53:01+05:30
> New Revision: 498e37e786ea2632b1c8596ad2512c306b3c8f58
>
> URL:
> https://github.com/llvm/llvm-project/commit/498e37e786ea2632b1c8596ad2512c306b3c8f58
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fcommit%2F498e37e786ea2632b1c8596ad2512c306b3c8f58&data=02%7C01%7CSourabhSingh.Tomar%40amd.com%7C6639667851bc4275b7f808d7ceddbc9f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637205324057970314&sdata=k%2B%2B3TyHMLxOIuZlCe%2FqyvYLHn060H7PHR7wCrH%2BkSSk%3D&reserved=0>
> DIFF:
> https://github.com/llvm/llvm-project/commit/498e37e786ea2632b1c8596ad2512c306b3c8f58.diff
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fcommit%2F498e37e786ea2632b1c8596ad2512c306b3c8f58.diff&data=02%7C01%7CSourabhSingh.Tomar%40amd.com%7C6639667851bc4275b7f808d7ceddbc9f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637205324057980306&sdata=vMaoTt5ZNVibGP41Y5TWWa48v3YysETrJH3hh7upE%2FI%3D&reserved=0>
>
> LOG: [DebugInfo]: Added DWARFv5 macro header flags and corresponding helper
> functions.
>
> Added:
>
>
> Modified:
> llvm/include/llvm/BinaryFormat/Dwarf.def
> llvm/include/llvm/BinaryFormat/Dwarf.h
> llvm/lib/BinaryFormat/Dwarf.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.def
> b/llvm/include/llvm/BinaryFormat/Dwarf.def
> index 3faf3be65032..5f744fc2ad25 100644
> --- a/llvm/include/llvm/BinaryFormat/Dwarf.def
> +++ b/llvm/include/llvm/BinaryFormat/Dwarf.def
> @@ -17,6 +17,7 @@
> defined HANDLE_DW_VIRTUALITY || defined HANDLE_DW_DEFAULTED ||
> \
> defined HANDLE_DW_CC || defined HANDLE_DW_LNS || defined
> HANDLE_DW_LNE || \
> defined HANDLE_DW_LNCT || defined HANDLE_DW_MACRO ||
> \
> + defined HANDLE_MACRO_FLAG ||
> \
> defined HANDLE_DW_RLE || defined HANDLE_DW_LLE ||
> \
> (defined HANDLE_DW_CFA && defined HANDLE_DW_CFA_PRED) ||
> \
> defined HANDLE_DW_APPLE_PROPERTY || defined HANDLE_DW_UT ||
> \
> @@ -87,6 +88,10 @@
> #define HANDLE_DW_MACRO(ID, NAME)
> #endif
>
> +#ifndef HANDLE_MACRO_FLAG
> +#define HANDLE_MACRO_FLAG(ID, NAME)
> +#endif
> +
> #ifndef HANDLE_DW_RLE
> #define HANDLE_DW_RLE(ID, NAME)
> #endif
> @@ -822,6 +827,11 @@ HANDLE_DW_MACRO(0x0a, import_sup)
> HANDLE_DW_MACRO(0x0b, define_strx)
> HANDLE_DW_MACRO(0x0c, undef_strx)
>
> +// DWARF v5 Macro header flags.
> +HANDLE_MACRO_FLAG(0x01, OFFSET_SIZE)
> +HANDLE_MACRO_FLAG(0x02, DEBUG_LINE_OFFSET)
> +HANDLE_MACRO_FLAG(0x04, OPCODE_OPERANDS_TABLE)
> +
> // DWARF v5 Range List Entry encoding values.
> HANDLE_DW_RLE(0x00, end_of_list)
> HANDLE_DW_RLE(0x01, base_addressx)
> @@ -956,6 +966,7 @@ HANDLE_DW_IDX(0x05, type_hash)
> #undef HANDLE_DW_LNE
> #undef HANDLE_DW_LNCT
> #undef HANDLE_DW_MACRO
> +#undef HANDLE_MACRO_FLAG
> #undef HANDLE_DW_RLE
> #undef HANDLE_DW_LLE
> #undef HANDLE_DW_CFA
>
> diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.h
> b/llvm/include/llvm/BinaryFormat/Dwarf.h
> index 27747300f229..45a3fc98d4b5 100644
> --- a/llvm/include/llvm/BinaryFormat/Dwarf.h
> +++ b/llvm/include/llvm/BinaryFormat/Dwarf.h
> @@ -470,6 +470,7 @@ StringRef ArrayOrderString(unsigned Order);
> StringRef LNStandardString(unsigned Standard);
> StringRef LNExtendedString(unsigned Encoding);
> StringRef MacinfoString(unsigned Encoding);
> +StringRef MacroString(unsigned Encoding);
> StringRef RangeListEncodingString(unsigned Encoding);
> StringRef LocListEncodingString(unsigned Encoding);
> StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch);
> @@ -498,6 +499,7 @@ unsigned getLanguage(StringRef LanguageString);
> unsigned getCallingConvention(StringRef LanguageString);
> unsigned getAttributeEncoding(StringRef EncodingString);
> unsigned getMacinfo(StringRef MacinfoString);
> +unsigned getMacro(StringRef MacroString);
> /// @}
>
> /// \defgroup DwarfConstantsVersioning Dwarf version for constants
>
> diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp
> b/llvm/lib/BinaryFormat/Dwarf.cpp
> index c3da0e2c4312..30c7e9c311b0 100644
> --- a/llvm/lib/BinaryFormat/Dwarf.cpp
> +++ b/llvm/lib/BinaryFormat/Dwarf.cpp
> @@ -477,6 +477,23 @@ unsigned llvm::dwarf::getMacinfo(StringRef
> MacinfoString) {
> .Default(DW_MACINFO_invalid);
> }
>
> +StringRef llvm::dwarf::MacroString(unsigned Encoding) {
> + switch (Encoding) {
> + default:
> + return StringRef();
> +#define HANDLE_DW_MACRO(ID, NAME)
> \
> + case DW_MACRO_##NAME:
> \
> + return "DW_MACRO_" #NAME;
> +#include "llvm/BinaryFormat/Dwarf.def"
> + }
> +}
> +
> +unsigned llvm::dwarf::getMacro(StringRef MacroString) {
> + return StringSwitch<unsigned>(MacroString)
> +#define HANDLE_DW_MACRO(ID, NAME) .Case("DW_MACRO_" #NAME, ID)
> +#include "llvm/BinaryFormat/Dwarf.def"
> + .Default(DW_MACINFO_invalid);
> +}
> StringRef llvm::dwarf::RangeListEncodingString(unsigned Encoding) {
> switch (Encoding) {
> default:
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-commits&data=02%7C01%7CSourabhSingh.Tomar%40amd.com%7C6639667851bc4275b7f808d7ceddbc9f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637205324057980306&sdata=HiQ0V2GTJHAXgPqOKEEq%2Fm8EJNROaRAnfDwsn%2FbJK0U%3D&reserved=0>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200322/be0fbd3e/attachment-0001.html>
More information about the llvm-commits
mailing list