diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-09 04:40:17 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-09 04:40:17 +0800 |
| commit | e5fdceb9b869f010a2a75638fd38aaf1867f3008 (patch) | |
| tree | 023d3e18960956f5ce369739c68aaa2a3e8400e7 /backend/tools | |
| parent | 6c7cecc81a4c7e06e26027e21edd2cfd95a37a0b (diff) | |
| download | rcc-project-e5fdceb9b869f010a2a75638fd38aaf1867f3008.tar.gz rcc-project-e5fdceb9b869f010a2a75638fd38aaf1867f3008.tar.xz | |
[CodeGen] Complete register allocation infrastructure
Diffstat (limited to 'backend/tools')
| -rw-r--r-- | backend/tools/DescriptionGenerator/DescriptionGeneratorMain.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/backend/tools/DescriptionGenerator/DescriptionGeneratorMain.cpp b/backend/tools/DescriptionGenerator/DescriptionGeneratorMain.cpp index 80b4767..13927e1 100644 --- a/backend/tools/DescriptionGenerator/DescriptionGeneratorMain.cpp +++ b/backend/tools/DescriptionGenerator/DescriptionGeneratorMain.cpp @@ -97,9 +97,14 @@ int main(int ArgumentCount, char *Arguments[]) { return 1; } - return writeFile(Command.RegisterHeaderPath, Result.Output->RegisterHeader) && - writeFile(Command.InstructionHeaderPath, Result.Output->InstructionHeader) && - writeFile(Command.TablesPath, Result.Output->TargetTables) + if (!Result.Output) { + std::cerr << "rcc-backend-descgen: successful generation produced no output\n"; + return 1; + } + const rcc::targetgen::GeneratedDescription &Output = Result.Output.value(); + return writeFile(Command.RegisterHeaderPath, Output.RegisterHeader) && + writeFile(Command.InstructionHeaderPath, Output.InstructionHeader) && + writeFile(Command.TablesPath, Output.TargetTables) ? 0 : 1; } |
