[PATCH] D30919: Salvage debug info from instructions about to be deleted

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 16:42:05 PDT 2017


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

As best as I can tell, this seems OK.

Code readability - it looks like findDbgValues should return a sequence instead of populating it, then it'd be easier to read. (or, alternatively, findDbgValues could be a function template that takes a lambda describing what to do with the dbg values)



================
Comment at: include/llvm/Transforms/Utils/Local.h:289
+/// Constants for \p replaceDbgDeclare and friends.
+enum { NoDeref = false, WithDeref = true };
+
----------------
I'd give this a name & use it for the function parameter. Maybe - I can sort of see how the implementation's more legible as a boolean than an enum... *shrug*


https://reviews.llvm.org/D30919





More information about the llvm-commits mailing list