[PATCH] D20986: [safestack] Fixup llvm.dbg.value when rewriting unsafe allocas.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 16:49:15 PDT 2016

pcc added a comment.

Can you also add a test case for dynamic alloca?

It looks like the same thing could also be done for ASan (but that can be a separate change).

Comment at: lib/Transforms/Utils/Local.cpp:1276
@@ +1275,3 @@
+    if (auto *MDV = MetadataAsValue::getIfExists(AI->getContext(), L))
+      while (!MDV->use_empty()) {
+        Use &U = *MDV->use_begin();
This won't terminate if there are any non-`llvm.dbg.value` uses of the value (or if `replaceOneDbgValueForAlloca` gives up).



More information about the llvm-commits mailing list