================
@@ -6158,6 +6085,9 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl
*D,
if (getLangOpts().OpenCL && ASTTy->isSamplerT())
return;
+ if (getLangOpts().Reflection && ASTTy->isMetaInfoType())
----------------
Sirraide wrote:
So actually, considering that you _can_ e.g. have variables of type
`std::meta::info` w/ external linkage
(https://github.com/llvm/llvm-project/pull/190356#discussion_r3035705278), we
might need this test here because if a variable has external linkage, I believe
we just emit it irrespective of whether it’s used anywhere. In that case
however we should not check for `getLangOpts().Reflection` here—if you get a
value of type `std::meta::info` while that’s disabled something has gone
horribly wrong somewhere anyway
https://github.com/llvm/llvm-project/pull/190356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits