[PATCH] D42566: [InstCombine] Preserve debug values for eliminable casts

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 02:44:11 PST 2018


JDevlieghere added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:275
+      findDbgUsers(CSrcDbgInsts, CSrc);
+      if (CSrcDbgInsts.size()) {
+        DIBuilder DIB(*CI.getModule());
----------------
Out of curiosity: why check `size()` and not `empty()`? Although irrelevant, the STL only guarantees that `empty()` is `O(1)`, but it's why it caught my eye here. :-) 


https://reviews.llvm.org/D42566





More information about the llvm-commits mailing list