[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 28 13:07:53 PDT 2024


================
@@ -60,11 +63,11 @@ int use() {
 
 // CHECK-NOT: @_ZTSW3Mod4Base = constant
 // CHECK-NOT: @_ZTIW3Mod4Base = constant
-// CHECK: @_ZTVW3Mod4Base = external unnamed_addr
+// CHECK: @_ZTVW3Mod4Base = external
 
-// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr constant
-// CHECK-INLINE: @_ZTSW3Mod4Base = linkonce_odr {{.*}}constant
-// CHECK-INLINE: @_ZTIW3Mod4Base = linkonce_odr {{.*}}constant
+// CHECK-INLINE-NOT: @_ZTSW3Mod4Base = constant
----------------
dwblaikie wrote:

`NOT` checks should be pretty broad - for instance these `NOT` checks would've passed with the old code too (since it was linkonce_odr, not constant) - perhaps these should just be non-NOT checks, affirmatively checking for the linkage of these globals (which I assume they are emitted, as declarations - if they aren't emitted at all, then `NOT: @foo` might be enough, without the ` = constant`?)

https://github.com/llvm/llvm-project/pull/75912


More information about the cfe-commits mailing list