[llvm] [IR] Fix Module move-assignment missing NamedMDSymTab, ComdatSymTab and Parent update (PR #175501)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 12 07:10:28 PST 2026
================
@@ -423,6 +423,13 @@ define void @Foo2() {
ASSERT_EQ(GV2->getParent(), &*M2);
*M1 = std::move(*M2);
ASSERT_EQ(GV2->getParent(), &*M1);
+
+ ASSERT_NE(M1->getNamedMetadata("foo2"), nullptr);
----------------
boomanaiden154 wrote:
Given it doesn't seem like there's test coverage of this anywhere else, it would be good if we could actually assert a value here rather than just asserting that we do not get `nullptr`.
These calls are also probably better off as `EXPECT_*` instead of `ASSERT_*` given they can all be run independently, but given that's consistent with the rest of the file, it's probably fine.
https://github.com/llvm/llvm-project/pull/175501
More information about the llvm-commits
mailing list