Go to the documentation of this file.
32 return llvm::make_error<SymbolRemappingParseError>(
38 Line = Line.ltrim(
' ');
40 if (Line.startswith(
"#") || Line.empty())
44 Line.split(Parts,
' ', -1,
false);
46 if (Parts.size() != 3)
47 return ReportError(
"Expected 'kind mangled_name mangled_name', "
48 "found '" + Line +
"'");
54 .
Case(
"encoding", FK::Encoding)
57 return ReportError(
"Invalid kind, expected 'name', 'type', or 'encoding',"
58 " found '" + Parts[0] +
"'");
61 switch (Canonicalizer.
addEquivalence(*FragmentKind, Parts[1], Parts[2])) {
65 case EE::ManglingAlreadyUsed:
66 return ReportError(
"Manglings '" + Parts[1] +
"' and '" + Parts[2] +
"' "
67 "have both been used in prior remappings. Move this "
68 "remapping earlier in the file.");
70 case EE::InvalidFirstMangling:
71 return ReportError(
"Could not demangle '" + Parts[1] +
"' "
72 "as a <" + Parts[0] +
">; invalid mangling?");
74 case EE::InvalidSecondMangling:
75 return ReportError(
"Could not demangle '" + Parts[2] +
"' "
76 "as a <" + Parts[0] +
">; invalid mangling?");
StringSwitch & Case(StringLiteral S, T Value)
This is an optimization pass for GlobalISel generic memory operations.
A forward iterator which reads text lines from a buffer.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
static ErrorSuccess success()
Create a success value.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
Error read(MemoryBuffer &B)
Read remappings from the given buffer, which must live as long as the remapper.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
StringRef - Represent a constant reference to a string, i.e.
const CustomOperand< const MCSubtargetInfo & > Msg[]
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Lightweight error class with error context and mandatory checking.
bool is_at_eof() const
Return true if we've reached EOF or are an "end" iterator.
int64_t line_number() const
Return the current line number. May return any number at EOF.
EquivalenceError addEquivalence(FragmentKind Kind, StringRef First, StringRef Second)
Add an equivalence between First and Second.
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
A switch()-like statement whose cases are string literals.