aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/MIR/MIDebugSyntax.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-09 04:40:17 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-09 04:40:17 +0800
commite5fdceb9b869f010a2a75638fd38aaf1867f3008 (patch)
tree023d3e18960956f5ce369739c68aaa2a3e8400e7 /backend/lib/MIR/MIDebugSyntax.cpp
parent6c7cecc81a4c7e06e26027e21edd2cfd95a37a0b (diff)
downloadrcc-project-e5fdceb9b869f010a2a75638fd38aaf1867f3008.tar.gz
rcc-project-e5fdceb9b869f010a2a75638fd38aaf1867f3008.tar.xz
[CodeGen] Complete register allocation infrastructure
Diffstat (limited to 'backend/lib/MIR/MIDebugSyntax.cpp')
-rw-r--r--backend/lib/MIR/MIDebugSyntax.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/backend/lib/MIR/MIDebugSyntax.cpp b/backend/lib/MIR/MIDebugSyntax.cpp
index bee82c4..fc08df6 100644
--- a/backend/lib/MIR/MIDebugSyntax.cpp
+++ b/backend/lib/MIR/MIDebugSyntax.cpp
@@ -16,15 +16,13 @@ namespace {
[[nodiscard]] bool parseIndex(std::string_view Text, std::uint64_t &Value) noexcept {
if (Text.empty())
return false;
- const auto [End, Error] =
- std::from_chars(Text.data(), Text.data() + Text.size(), Value, 10);
+ const auto [End, Error] = std::from_chars(Text.data(), Text.data() + Text.size(), Value, 10);
return Error == std::errc{} && End == Text.data() + Text.size();
}
} // namespace
-std::optional<std::uint64_t>
-parseDIExpressionOpcodeName(std::string_view Name) noexcept {
+std::optional<std::uint64_t> parseDIExpressionOpcodeName(std::string_view Name) noexcept {
const auto NumberedOpcode = [Name](std::string_view Prefix,
std::uint64_t Base) -> std::optional<std::uint64_t> {
if (!Name.starts_with(Prefix))
@@ -117,7 +115,7 @@ parseDIExpressionOpcodeName(std::string_view Name) noexcept {
{"DW_OP_LLVM_implicit_pointer", 0x1004},
{"DW_OP_LLVM_arg", 0x1005},
});
- const auto Found =
+ const auto *const Found =
std::ranges::find_if(NamedOpcodes, [Name](const auto &Entry) { return Entry.first == Name; });
if (Found == NamedOpcodes.end())
return std::nullopt;