[PATCH] D45556: [DebugInfo] Generate DWARF debug information for labels.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 18:33:36 PDT 2018


HsiangKai added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:835
+      applyVariableAttributes(*Var, *Die);
+    else if (const DbgLabel *Label = dyn_cast<const DbgLabel>(Entity))
+      applyLabelAttributes(*Label, *Die);
----------------
aprantl wrote:
> can this be anything else? Should this be a static cast instead?
Entity could be DbgVariable or DbgLabel. I use dyn_cast<> to cast and check their type. In this way, I could put them in if statement to ensure they are correct type before entering if block/else block.


Repository:
  rL LLVM

https://reviews.llvm.org/D45556





More information about the llvm-commits mailing list