Mercurial > hg > CbC > CbC_llvm
comparison tools/llvm-cxxdump/Error.cpp @ 120:1172e4bd9c6f
update 4.0.0
author | mir3636 |
---|---|
date | Fri, 25 Nov 2016 19:14:25 +0900 |
parents | afa8332a0e37 |
children | c2174574ed3a |
comparison
equal
deleted
inserted
replaced
101:34baf5011add | 120:1172e4bd9c6f |
---|---|
15 #include "llvm/Support/ErrorHandling.h" | 15 #include "llvm/Support/ErrorHandling.h" |
16 | 16 |
17 using namespace llvm; | 17 using namespace llvm; |
18 | 18 |
19 namespace { | 19 namespace { |
20 // FIXME: This class is only here to support the transition to llvm::Error. It | |
21 // will be removed once this transition is complete. Clients should prefer to | |
22 // deal with the Error value directly, rather than converting to error_code. | |
20 class cxxdump_error_category : public std::error_category { | 23 class cxxdump_error_category : public std::error_category { |
21 public: | 24 public: |
22 const char *name() const LLVM_NOEXCEPT override { return "llvm.cxxdump"; } | 25 const char *name() const noexcept override { return "llvm.cxxdump"; } |
23 std::string message(int ev) const override { | 26 std::string message(int ev) const override { |
24 switch (static_cast<cxxdump_error>(ev)) { | 27 switch (static_cast<cxxdump_error>(ev)) { |
25 case cxxdump_error::success: | 28 case cxxdump_error::success: |
26 return "Success"; | 29 return "Success"; |
27 case cxxdump_error::file_not_found: | 30 case cxxdump_error::file_not_found: |