[PATCH] D37771: llvm-dwarfdump: automatically dump both regular and .dwo variant of sections

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 11:55:22 PDT 2017


probinson added inline comments.


================
Comment at: include/llvm/DebugInfo/DIContext.h:127
 /// Selects which debug sections get dumped.
-enum DIDumpType : uint64_t {
+enum DIDumpType : unsigned {
   DIDT_Null,
----------------
rnk wrote:
> probinson wrote:
> > I am reminded that MSVC traditionally has not correctly handled enum values wider than 32 bits, so I'm happy to see this change and apologize for not noticing it in the original patch that added DIDumpType.
> > Or has MSVC learned to do 64-bit enum values?  It used to just silently truncate to 32 bits.
> Microsoft never implemented the rules about deducing the type of the enum from the enumerator values. It would be an ABI break in some ways if they did that today. You could argue that truncating enumerators that were too wide was already a bug, but that's the status.
> 
> Instead, they implemented strong enums as a way to let the user explicitly say "yeah, I really want a uint64_t", so this code should work fine.
Good to know, thanks!


https://reviews.llvm.org/D37771





More information about the llvm-commits mailing list