[PATCH] D86185: [Cloning] Fix to cloning DISubprograms.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 09:37:36 PDT 2020


aprantl added a comment.

Thanks! Having a test would be really important to document the expected functionality and prevent future regressions.
Every time we change something here, we tend to find new unexpected behavior in a very complex LTO build a couple months later ;-)



================
Comment at: llvm/lib/Transforms/Utils/CloneFunction.cpp:194
 
+  SmallVector<std::pair<unsigned, MDNode *>, 1> MDs;
+  OldFunc->getAllMetadata(MDs);
----------------
Can you add a comment here explaining what this loop does?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86185



More information about the llvm-commits mailing list