LLVM: lib/Support/VirtualOutputError.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
15
16using namespace llvm;
18
19void OutputError::anchor() {}
20void OutputConfigError::anchor() {}
21void TempFileOutputError::anchor() {}
22
26
31
34 OS << ": " << Config;
35}
36
41
42namespace {
43class OutputErrorCategory : public std::error_category {
44public:
45 const char *name() const noexcept override;
46 std::string message(int EV) const override;
47};
48}
49
51 static OutputErrorCategory ErrorCategory;
52 return ErrorCategory;
53}
54
55const char *OutputErrorCategory::name() const noexcept {
56 return "llvm.vfs.output";
57}
58
59std::string OutputErrorCategory::message(int EV) const {
61 switch (E) {
63 return "invalid config";
65 return "output not closed";
67 return "output already closed";
69 return "output has open proxy";
70 }
72 "An enumerator of OutputErrorCode does not have a message defined.");
73}
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains the declarations of the OutputError class.
void log(raw_ostream &OS) const override
Print an error message to an output stream.
This class implements an extremely fast bulk output stream that can only output to a stream.
void log(raw_ostream &OS) const override
Definition VirtualOutputError.cpp:32
StringRef getOutputPath() const
void log(raw_ostream &OS) const override
Print an error message to an output stream.
Definition VirtualOutputError.cpp:27
void log(raw_ostream &OS) const override
Definition VirtualOutputError.cpp:37
StringRef getTempPath() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const std::error_category & output_category()
Definition VirtualOutputError.cpp:50
This is an optimization pass for GlobalISel generic memory operations.
Implement std::hash so that hash_code can be used in STL containers.