[PATCH] D54465: [CodeGen] Fix bugs in LiveDebugVariables when debug labels are generated.

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 04:16:55 PST 2018


dstenb added inline comments.


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:501
+  unsigned Line;
+  if (const auto *V = cast_or_null<const DILocalVariable>(Node)) {
+    Res = V->getName();
----------------
The cast will assert if `Node` is not a `DILocalVariable`, so I don't think it's possible to use this function with DILabels? I think you want `dyn_cast_or_null` (or rather `dyn_cast`, if `Node` is expected to be non-null).





Repository:
  rL LLVM

https://reviews.llvm.org/D54465





More information about the llvm-commits mailing list