[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)
Sergei Barannikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 11:11:09 PST 2024
================
@@ -3302,6 +3302,9 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
CharUnits Align = CGM.getContext().getDeclAlign(VD);
Val = Builder.CreateAlignedLoad(Var->getValueType(), Val, Align);
}
+ if (Val->getType() != Wrapper->getReturnType()) {
+ Val = Builder.CreateAddrSpaceCast(Val, Wrapper->getReturnType());
+ }
----------------
s-barannikov wrote:
No braces around one-line `if`.
https://github.com/llvm/llvm-project/pull/119246
More information about the cfe-commits
mailing list