aboutsummaryrefslogtreecommitdiff
path: root/backend/unittests/MIR/MIParserTest.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-12 03:22:55 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-12 03:22:55 +0800
commit59f948dbb4fcbbb2456db92a55d307cdfbfd8307 (patch)
treedaf0517cf840091eb92bed0096c5b3ee110c29d7 /backend/unittests/MIR/MIParserTest.cpp
parent888e9b5bb57a79f4eee88a7926cb859e04823361 (diff)
downloadrcc-project-59f948dbb4fcbbb2456db92a55d307cdfbfd8307.tar.gz
rcc-project-59f948dbb4fcbbb2456db92a55d307cdfbfd8307.tar.xz
[MIR] Remove alternate layout and float APIs
Diffstat (limited to 'backend/unittests/MIR/MIParserTest.cpp')
-rw-r--r--backend/unittests/MIR/MIParserTest.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/backend/unittests/MIR/MIParserTest.cpp b/backend/unittests/MIR/MIParserTest.cpp
index e57cdfb..815a18e 100644
--- a/backend/unittests/MIR/MIParserTest.cpp
+++ b/backend/unittests/MIR/MIParserTest.cpp
@@ -221,7 +221,9 @@ bb.1."exit block" (landing-pad, bbsections Cold):
rcc::mir::MIParserContext ParserContext;
ParserContext.Metadata.push_back(
{.TextID = 0, .Reference = rcc::MachineMetadataReference::embeddedIR(0)});
- ParserContext.DefaultPointerSizeInBits = 64;
+ ParserContext.PointerSizeInBits = [](std::uint32_t) -> rcc::Expected<std::uint32_t> {
+ return 64;
+ };
rcc::mir::MIParser Parser(*Function, *Target, "body.mir", Body, ParserContext);
const auto Parsed = Parser.parse();
const bool ParseSucceeded =
@@ -507,7 +509,9 @@ void testLLVMInlineAsmAndConstantMemorySyntax(TestContext &Context) {
%1:gpr64 = TEST_LOAD $g0 :: (load (s64) from unknown-address + 4)
)";
rcc::mir::MIParserContext ParserContext;
- ParserContext.DefaultPointerSizeInBits = 64;
+ ParserContext.PointerSizeInBits = [](std::uint32_t) -> rcc::Expected<std::uint32_t> {
+ return 64;
+ };
rcc::mir::MIParser Parser(*Function, *Target, "llvm-compatible.mir", Body, ParserContext);
auto Parsed = Parser.parse();
Context.expect(Parsed.has_value(), "LLVM inline-asm and constant-pointer MMO syntax must parse");
@@ -553,7 +557,9 @@ void testLLVMCompareExchangeMemorySyntax(TestContext &Context) {
%3:_(s8) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store monotonic (s8))
)";
rcc::mir::MIParserContext ParserContext;
- ParserContext.DefaultPointerSizeInBits = 64;
+ ParserContext.PointerSizeInBits = [](std::uint32_t) -> rcc::Expected<std::uint32_t> {
+ return 64;
+ };
rcc::mir::MIParser Parser(*Function, *Target, "llvm-cmpxchg.mir", Body, ParserContext);
const auto Parsed = Parser.parse();
Context.expect(Parsed.has_value(), "LLVM one-ordering compare-exchange MMO syntax must parse");