aboutsummaryrefslogtreecommitdiff
path: root/backend/unittests/CodeGen/MachineConstantPoolTest.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-07 01:27:41 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-07 01:27:41 +0800
commit76d89700953ddd81cf31ab8f260eddf67e93aa85 (patch)
treec96a453164154b2d1559cea36910df52103f0f19 /backend/unittests/CodeGen/MachineConstantPoolTest.cpp
parent183e2354e9fdd107be420cbb185c1d239434aa48 (diff)
downloadrcc-project-76d89700953ddd81cf31ab8f260eddf67e93aa85.tar.gz
rcc-project-76d89700953ddd81cf31ab8f260eddf67e93aa85.tar.xz
[MIR] Complete document parsing and printing
Implement the single LLVM-compatible MIR document path with structured\nembedded-IR references, YAML mappings, constants, and deterministic printing.\n\nKeep pointer LLT widths DataLayout-derived, reject layout-dependent output\nwhen embedded IR is omitted, and record the fixed-baseline compatibility\ncontract and regression coverage.
Diffstat (limited to 'backend/unittests/CodeGen/MachineConstantPoolTest.cpp')
-rw-r--r--backend/unittests/CodeGen/MachineConstantPoolTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/unittests/CodeGen/MachineConstantPoolTest.cpp b/backend/unittests/CodeGen/MachineConstantPoolTest.cpp
index 7343fdb..08b69e2 100644
--- a/backend/unittests/CodeGen/MachineConstantPoolTest.cpp
+++ b/backend/unittests/CodeGen/MachineConstantPoolTest.cpp
@@ -128,8 +128,8 @@ struct PoolTargetConstant final {
[[nodiscard]] rcc::MachineConstantPoolEntryDesc
genericDescription(rcc::ConstantPoolMergeKind Merge) {
rcc::MachineConstantPoolEntryDesc Description;
- Description.Value =
- rcc::GenericConstantData{"i32", {std::byte{1}, std::byte{2}, std::byte{3}, std::byte{4}}};
+ auto Integer = rcc::IntegerImmediate::fromUnsigned(32, 0x04030201U);
+ Description.Value = std::move(*rcc::GenericConstantData::integer(std::move(*Integer)));
Description.Size = 4;
Description.Align = *rcc::Alignment::create(4);
Description.Merge = Merge;