================
@@ -1440,4 +1440,84 @@ TEST_F(CloneModule, GlobalWithBlockAddressesInitializer)
{
ASSERT_NE(OriginalBa->getBasicBlock(), ClonedBa->getBasicBlock());
}
+TEST_F(CloneModule, ODRUniqueTypeMethodVerifier) {
+ // Test that the following IR, reduced from a self-host clang-22 compile,
+ // doesn't trip the verifier after cloning.
----------------
OCHyams wrote:
It _can_ be replicated from the command line: you need to tell opt or llc to
run twice to force a module clone, which in the case of opt I think requires
enabling the old pass manager, and you need to pass
`-disable-debug-info-type-map` too to avoid the parser accidentally fixing the
issue by making the DISubprogram's scope, a DICompositeType, distinct.
I agree this unittest feels a bit weird, but my thinking was the steps above
for a lit test seemed a convoluted way to force the necessary conditions and
that this was a bit cleaner. Happy to revert to the lit test method if you feel
it is better on balance.
https://github.com/llvm/llvm-project/pull/217042
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits