[PATCH] D24533: Fix auto-upgrade of TBAA tags in Bitcode Reader

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 20:43:53 PDT 2016


mehdi_amini added inline comments.

================
Comment at: lib/AsmParser/LLParser.cpp:225-226
@@ -224,3 +224,4 @@
 
-  for (unsigned I = 0, E = InstsWithTBAATag.size(); I < E; I++)
-    UpgradeInstWithTBAATag(InstsWithTBAATag[I]);
+  for (unsigned I = 0, E = InstsWithTBAATag.size(); I < E; I++) {
+    auto *Inst = InstsWithTBAATag[I];
+    MDNode *MD = Inst->getMetadata(LLVMContext::MD_tbaa);
----------------
majnemer wrote:
> Range-based loop?
Sure, good cleanup!
(The whole file deserves some probably)

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:3752-3753
@@ -3753,3 +3751,4 @@
           // are auto-upgraded.
           return globalCleanup();
+          return std::error_code();
         }
----------------
majnemer wrote:
> Return after return?
Some debug slipped...


https://reviews.llvm.org/D24533





More information about the llvm-commits mailing list