summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2025-11-20 15:44:58 -0800
committerFlorian Mayer <fmayer@google.com>2025-11-20 15:44:58 -0800
commitda1d82491dfa34c08534ea747f0ceedef0bd33be (patch)
tree2f4f18d335550ee1618612783a10ebdddf1febef /clang/lib/CodeGen/CGExprAgg.cpp
parenta5fb057dd9a7cdc777f0ce940d3e28421dbb5a4a (diff)
parent49e46a57cc1575271179c8c9c6fec5639781e9c6 (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/fmayer/spr/main.ubsan-add-fsanitize-preserve-runtime-flag
Created using spr 1.3.7 [skip ci]
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 4e61a6f61948..67b5f919d1b2 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -2278,6 +2278,10 @@ void CodeGenFunction::EmitAggregateCopy(LValue Dest, LValue Src, QualType Ty,
}
}
+ if (getLangOpts().HLSL && Ty.getAddressSpace() == LangAS::hlsl_constant)
+ if (CGM.getHLSLRuntime().emitBufferCopy(*this, DestPtr, SrcPtr, Ty))
+ return;
+
// Aggregate assignment turns into llvm.memcpy. This is almost valid per
// C99 6.5.16.1p3, which states "If the value being stored in an object is
// read from another object that overlaps in anyway the storage of the first