[PATCH] D103220: Support stripping indirectly referenced DILocations from !llvm.loop metadata in stripDebugInfo()

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 09:37:18 PDT 2021


aprantl added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1523
+      auto updateLoopInfoLoc = [&Ctx, &InlinedAtNode,
+                                &IANodes](Metadata *MD) -> Metadata * {
+        if (auto *Loc = dyn_cast_or_null<DILocation>(MD))
----------------
shafik wrote:
> I see that previously `Loc` was `const` can `MD` also be `const`?
I don't think so because we need to return it as a `Metadata *` and the input may be nullptr.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103220/new/

https://reviews.llvm.org/D103220



More information about the llvm-commits mailing list