Refactor section creation errors, and simplify output for single errors (#1964)

This commit is contained in:
Rangi
2026-05-21 13:01:08 -04:00
committed by GitHub
parent 728d14879b
commit d56dbbb4bf
20 changed files with 132 additions and 87 deletions
+5 -1
View File
@@ -61,13 +61,17 @@ extern Diagnostics<WarningLevel, WarningID> warnings;
void warning(WarningID id, char const *fmt, ...);
// Used for errors that compromise the whole assembly process by affecting the
// following code, potencially making the assembler generate errors caused by
// following code, potentially making the assembler generate errors caused by
// the first one and unrelated to the code that the assembler complains about.
// It is also used when the assembler goes into an invalid state (for example,
// when it fails to allocate memory).
[[gnu::format(printf, 1, 2), noreturn]]
void fatal(char const *fmt, ...);
// Used for fatal errors that handle their own backtrace output.
[[noreturn]]
void fatalNoTrace(std::function<void()> callback);
// Used for errors that make it impossible to assemble correctly, but don't
// affect the following code. The code will fail to assemble but the user will
// get a list of all errors at the end, making it easier to fix all of them at