From 59f948dbb4fcbbb2456db92a55d307cdfbfd8307 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Wed, 12 Aug 2026 03:22:55 +0800 Subject: [MIR] Remove alternate layout and float APIs --- backend/lib/MIR/MIRDocumentPrinter.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'backend/lib/MIR/MIRDocumentPrinter.cpp') diff --git a/backend/lib/MIR/MIRDocumentPrinter.cpp b/backend/lib/MIR/MIRDocumentPrinter.cpp index 5cc0173..06998bb 100644 --- a/backend/lib/MIR/MIRDocumentPrinter.cpp +++ b/backend/lib/MIR/MIRDocumentPrinter.cpp @@ -387,9 +387,6 @@ MIRDocumentPrinter::verifyOmittedEmbeddedIRLayout(const MachineFunction &Functio const EmbeddedIRReferenceIndex *Embedded = Document.embeddedIR(); if (Embedded == nullptr) return {}; - const auto EmbeddedDataLayout = Embedded->dataLayout(); - if (!EmbeddedDataLayout) - return {}; bool HasLayoutDependentContent = false; for (const VirtualRegisterInfo &RegisterInfo : Function.registerInfo().virtualRegisters()) { @@ -412,14 +409,14 @@ MIRDocumentPrinter::verifyOmittedEmbeddedIRLayout(const MachineFunction &Functio if (!HasLayoutDependentContent) return {}; - if (Options.DataLayout != *EmbeddedDataLayout) { + if (Options.DataLayout.empty()) { return makeUnexpected( ErrorCode::InvalidArgument, - "omitting embedded LLVM IR requires printer DataLayout to exactly match its data layout"); + "omitting embedded LLVM IR with layout-dependent MIR requires an explicit printer " + "DataLayout"); } const LLVMConstantSyntaxOptions LayoutOptions{ - .DefaultPointerSizeInBits = Options.DefaultPointerSizeInBits, .DataLayout = Options.DataLayout, .NamedTypes = {}, }; -- cgit v1.2.3