LLVM: lib/Remarks/RemarkFormat.cpp Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
16
17using namespace llvm;
19
25
27 return createStringError(std::make_error_code(std::errc::invalid_argument),
28 "Unknown remark format: '%s'",
29 FormatStr.data());
30
31 return Result;
32}
33
35 auto Result =
39 Format::YAML)
42
44 return createStringError(std::make_error_code(std::errc::invalid_argument),
45 "Automatic detection of remark format failed. "
46 "Unknown magic number: '%.4s'",
47 MagicStr.data());
48 return Result;
49}
50
54 return createStringError(std::make_error_code(std::errc::invalid_argument),
55 "Unknown remark parser format.");
57 return Selected;
58
59
60 if (MagicStr.empty())
63}
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
A switch()-like statement whose cases are string literals.
StringSwitch & StartsWith(StringLiteral S, T Value)
StringSwitch & Cases(std::initializer_list< StringLiteral > CaseStrings, T Value)
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.