[PATCH] D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 20:30:12 PDT 2020


rjmccall added a comment.

Code looks like, minor comments aside.  Please add a test case for the auto-upgrader.



================
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5173
+    // Clang keeps "Objective-C Garbage Collection" metadata and
+    // the value should be i8 instead of i32.
     Mod.addModuleFlag(llvm::Module::Error,
----------------
These two comments are both just restating the code and can be dropped.


================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:4069
+        assert(Md->getValue() && "Expected non-empty metadata");
+        assert(Md->getValue()->getType() && "Expected non-empty type");
+        auto Type = Md->getValue()->getType();
----------------
We don't generally assert basic structural well-formedness properties like "values have types", or else we'd have a million assertions everywhere.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71219/new/

https://reviews.llvm.org/D71219





More information about the llvm-commits mailing list