[AMDGPU][AsmParser][NFC] Translate parsed MIMG instructions to MCInsts automatically.
[llvm-project.git] / llvm / lib / DWARFLinkerParallel / OutputSections.cpp
blob69c5bfaa7bdf84f284e1f3110dfa131a76759688
1 //=== OutputSections.cpp --------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "OutputSections.h"
10 #include "llvm/ADT/StringSwitch.h"
12 namespace llvm {
13 namespace dwarflinker_parallel {
15 std::optional<OutputSections::DebugSectionKind>
16 OutputSections::parseDebugSectionName(llvm::StringRef SecName) {
17 return llvm::StringSwitch<std::optional<OutputSections::DebugSectionKind>>(
18 SecName)
19 .Case("debug_info", DebugSectionKind::DebugInfo)
20 .Case("debug_line", DebugSectionKind::DebugLine)
21 .Case("debug_frame", DebugSectionKind::DebugFrame)
22 .Case("debug_ranges", DebugSectionKind::DebugRange)
23 .Case("debug_rnglists", DebugSectionKind::DebugRngLists)
24 .Case("debug_loc", DebugSectionKind::DebugLoc)
25 .Case("debug_loclists", DebugSectionKind::DebugLocLists)
26 .Case("debug_aranges", DebugSectionKind::DebugARanges)
27 .Case("debug_abbrev", DebugSectionKind::DebugAbbrev)
28 .Case("debug_macinfo", DebugSectionKind::DebugMacinfo)
29 .Case("debug_macro", DebugSectionKind::DebugMacro)
30 .Default(std::nullopt);
32 return std::nullopt;
35 } // end of namespace dwarflinker_parallel
36 } // end of namespace llvm