diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-13 06:19:30 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-13 06:19:30 +0800 |
| commit | d62f022c92fcc3ebe2269273628943a0089683fd (patch) | |
| tree | 92d13e4888b095cca71a0ac8b9b9eb99cc845596 /backend/unittests | |
| parent | 236082a0fe4dcd0362c5c74923a93e3db6a01291 (diff) | |
| download | rcc-project-d62f022c92fcc3ebe2269273628943a0089683fd.tar.gz rcc-project-d62f022c92fcc3ebe2269273628943a0089683fd.tar.xz | |
[CodeGen] Align MIR parser and printer ownership
Diffstat (limited to 'backend/unittests')
| -rw-r--r-- | backend/unittests/MIR/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | backend/unittests/MIR/MILexerTest.cpp | 2 | ||||
| -rw-r--r-- | backend/unittests/MIR/MIParserTest.cpp | 4 | ||||
| -rw-r--r-- | backend/unittests/MIR/MIRDocumentTest.cpp | 4 | ||||
| -rw-r--r-- | backend/unittests/Tooling/PipelineDriverTest.cpp | 2 |
5 files changed, 10 insertions, 6 deletions
diff --git a/backend/unittests/MIR/CMakeLists.txt b/backend/unittests/MIR/CMakeLists.txt index 6b41474..ae72452 100644 --- a/backend/unittests/MIR/CMakeLists.txt +++ b/backend/unittests/MIR/CMakeLists.txt @@ -17,6 +17,10 @@ add_test( add_executable(RCCBackendMILexerTests MILexerTest.cpp) rcc_backend_configure_target(RCCBackendMILexerTests) +target_include_directories( + RCCBackendMILexerTests + PRIVATE "${RCC_BACKEND_SOURCE_DIR}/lib/CodeGen/MIRParser" +) target_link_libraries(RCCBackendMILexerTests PRIVATE RCCBackend::MIR) add_test(NAME RCCBackend.MIR.MILexer COMMAND RCCBackendMILexerTests) diff --git a/backend/unittests/MIR/MILexerTest.cpp b/backend/unittests/MIR/MILexerTest.cpp index 5ebd2ca..46b9cae 100644 --- a/backend/unittests/MIR/MILexerTest.cpp +++ b/backend/unittests/MIR/MILexerTest.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later -#include "rcc/MIR/MILexer.h" +#include "MILexer.h" #include "rcc/Support/TextDiagnostic.h" diff --git a/backend/unittests/MIR/MIParserTest.cpp b/backend/unittests/MIR/MIParserTest.cpp index 815a18e..60987f4 100644 --- a/backend/unittests/MIR/MIParserTest.cpp +++ b/backend/unittests/MIR/MIParserTest.cpp @@ -1,10 +1,11 @@ // SPDX-License-Identifier: GPL-3.0-or-later -#include "rcc/MIR/MIParser.h" +#include "rcc/CodeGen/MIRParser/MIParser.h" #include "Target/TestTarget.h" #include "rcc/CodeGen/GenericOpcodes.h" #include "rcc/CodeGen/InstructionDescriptor.h" +#include "rcc/CodeGen/MIRPrinter.h" #include "rcc/CodeGen/MachineBasicBlock.h" #include "rcc/CodeGen/MachineFunction.h" #include "rcc/CodeGen/MachineInstr.h" @@ -12,7 +13,6 @@ #include "rcc/CodeGen/MachineOperand.h" #include "rcc/CodeGen/MachineRegisterInfo.h" #include "rcc/CodeGen/TargetDescription.h" -#include "rcc/MIR/MIPrinter.h" #include <cstdint> #include <iostream> diff --git a/backend/unittests/MIR/MIRDocumentTest.cpp b/backend/unittests/MIR/MIRDocumentTest.cpp index 52e5d65..7f1dfc3 100644 --- a/backend/unittests/MIR/MIRDocumentTest.cpp +++ b/backend/unittests/MIR/MIRDocumentTest.cpp @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-or-later -#include "rcc/MIR/MIRDocument.h" - #include "Target/TestTarget.h" #include "rcc/CodeGen/CompilationUnit.h" #include "rcc/CodeGen/InstructionDescriptor.h" +#include "rcc/CodeGen/MIRParser/MIRParser.h" +#include "rcc/CodeGen/MIRPrinter.h" #include "rcc/CodeGen/MachineBasicBlock.h" #include "rcc/CodeGen/MachineCompilationStatus.h" #include "rcc/CodeGen/MachineConstantPool.h" diff --git a/backend/unittests/Tooling/PipelineDriverTest.cpp b/backend/unittests/Tooling/PipelineDriverTest.cpp index 473b444..bed09be 100644 --- a/backend/unittests/Tooling/PipelineDriverTest.cpp +++ b/backend/unittests/Tooling/PipelineDriverTest.cpp @@ -3,8 +3,8 @@ #include "rcc/Tooling/PipelineDriver.h" #include "ToolingTestSupport.h" +#include "rcc/CodeGen/MIRPrinter.h" #include "rcc/CodeGen/MachineFunction.h" -#include "rcc/MIR/MIRDocument.h" #include "rcc/Target/RISCV/RISCVTarget.h" #include "rcc/Tooling/BackendDriver.h" |
