aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/RegAllocInternal.h
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 13:18:05 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 13:18:05 +0800
commit8558f80b4077536d6aa46b97328d6df1210e261f (patch)
tree373a2242db00ddeb9a1af83dbd853e97e0bd12d3 /backend/lib/CodeGen/RegAllocInternal.h
parent65321c12beb31c5743e0cf3f28e7aec178b730a2 (diff)
downloadrcc-project-8558f80b4077536d6aa46b97328d6df1210e261f.tar.gz
rcc-project-8558f80b4077536d6aa46b97328d6df1210e261f.tar.xz
[Support] Centralize error context handling
Diffstat (limited to 'backend/lib/CodeGen/RegAllocInternal.h')
-rw-r--r--backend/lib/CodeGen/RegAllocInternal.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/backend/lib/CodeGen/RegAllocInternal.h b/backend/lib/CodeGen/RegAllocInternal.h
index 0becb92..52840cf 100644
--- a/backend/lib/CodeGen/RegAllocInternal.h
+++ b/backend/lib/CodeGen/RegAllocInternal.h
@@ -26,9 +26,6 @@
#include <optional>
#include <ranges>
#include <span>
-#include <string>
-#include <string_view>
-#include <utility>
#include <vector>
namespace rcc::regalloc_detail {
@@ -39,12 +36,6 @@ struct AllocationRunResult final {
bool ChangedFrame = false;
};
-[[nodiscard]] inline Error withPrefix(const Error &Failure, std::string_view Prefix) {
- std::string Message(Prefix);
- Message.append(Failure.message());
- return Error(Failure.code(), std::move(Message));
-}
-
[[nodiscard]] inline Expected<Register> virtualRegisterAt(std::size_t Index) {
auto Reg = Register::makeVirtual(Index);
if (!Reg)