aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 17:36:10 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 17:36:10 +0800
commitfa965e7d8c51f264219f182f9cdaeeadf33f9f87 (patch)
tree151b70c35fbf84bae3c191c9427d3ee65bfc919c /backend
parent902e5c3271f7379df7f579e7663ccb802b8ac0e2 (diff)
downloadrcc-project-fa965e7d8c51f264219f182f9cdaeeadf33f9f87.tar.gz
rcc-project-fa965e7d8c51f264219f182f9cdaeeadf33f9f87.tar.xz
[CodeGen] Avoid unchecked memory alignment access
Diffstat (limited to 'backend')
-rw-r--r--backend/unittests/CodeGen/MachineValueTypesTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/unittests/CodeGen/MachineValueTypesTest.cpp b/backend/unittests/CodeGen/MachineValueTypesTest.cpp
index 64d4465..819d6cb 100644
--- a/backend/unittests/CodeGen/MachineValueTypesTest.cpp
+++ b/backend/unittests/CodeGen/MachineValueTypesTest.cpp
@@ -198,8 +198,8 @@ void testMachineMemOperand(TestContext &Context) {
OffsetAlignment.Align = *rcc::Alignment::create(4);
OffsetAlignment.BaseAlign = *rcc::Alignment::create(8);
auto OffsetAligned = rcc::MachineMemOperand::create(OffsetAlignment);
- Context.expect(OffsetAligned && OffsetAligned->description().BaseAlign &&
- OffsetAligned->description().BaseAlign->bytes() == 8,
+ Context.expect(OffsetAligned &&
+ OffsetAligned->description().BaseAlign == *rcc::Alignment::create(8),
"MMO base alignment must derive effective alignment through its offset");
OffsetAlignment.Align = *rcc::Alignment::create(8);