[PATCH] D30448: [DebugInfo] Show implicit_const values when dumping .debug_info section

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 08:45:52 PST 2017


dblaikie added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:94-95
   
-  if (!formValue.extractValue(U->getDebugInfoExtractor(), OffsetPtr, U))
+  if (AS.isImplicitConst())
+    formValue.setSValue(*AS.ByteSizeOrValue);
+  else if (!formValue.extractValue(U->getDebugInfoExtractor(), OffsetPtr, U))
----------------
I wouldn't expect to see a special case here. Is it necessary? I'd expect extractValue to do the work necessary for whatever the attribute kind is (as it already does for form_present, I assume).

I guess the issue is that DWARFFormValue only holds the form enum, not the rest - I think that probably should be changed so that extractValue can still behave uniformly across all forms.

So DWARFFormValue should take the AttributeSpec... oh, but that has the attribute in it.

Maybe what's needed is a thing that represents the form +ByteSizeOrValue. Maybe it could be called "FormSpec" to match "AttributeSpec"? Not sure.


https://reviews.llvm.org/D30448





More information about the llvm-commits mailing list