[PATCH] D13553: Support for llvm-bcanalyzer dumping of record array strings.

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 08:27:16 PDT 2015


joker.eph added inline comments.

================
Comment at: tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:518
@@ +517,3 @@
+            continue;
+          assert(i + 2 == e && "Array op not second to last");
+          std::string Str;
----------------
I don't understand this assert? The position of an array is supposed to be always second to last? What has to follow?

================
Comment at: tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:521
@@ +520,3 @@
+          bool ArrayIsPrintable = true;
+          for (unsigned j = i - 1, je = Record.size(); j != je; ++j) {
+            if (!isprint(static_cast<unsigned char>(Record[j]))) {
----------------
I don't know why is this loop going to the end of the record?


http://reviews.llvm.org/D13553





More information about the llvm-commits mailing list