[PATCH] D27839: Strip invalid TBAA when reading bitcode

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 11:18:08 PST 2016


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

lgtm



================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:159
+    for (auto &I : instructions(F))
+      if (MDNode *TBAA = I.getMetadata(LLVMContext::MD_tbaa))
+        I.setMetadata(LLVMContext::MD_tbaa, nullptr);
----------------
The checking is redundant -- you can just do `I.setMetadata(LLVMContext::MD_tbaa, nullptr)` unconditionally (that should not do anything if `MD_tbaa` was not present on the instruction).


https://reviews.llvm.org/D27839





More information about the llvm-commits mailing list