summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
committerpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
commit53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch)
tree7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp
parentIn preparation of compiling our kernels with -ffreestanding, explicitly map (diff)
downloadwireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz
wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp')
-rw-r--r--gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp b/gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp
index 34e17999802..789f3b81317 100644
--- a/gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp
+++ b/gnu/llvm/lib/DebugInfo/PDB/GenericError.cpp
@@ -20,7 +20,7 @@ namespace {
// deal with the Error value directly, rather than converting to error_code.
class GenericErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb"; }
+ const char *name() const noexcept override { return "llvm.pdb"; }
std::string message(int Condition) const override {
switch (static_cast<generic_error_code>(Condition)) {
@@ -45,11 +45,10 @@ char GenericError::ID = 0;
GenericError::GenericError(generic_error_code C) : GenericError(C, "") {}
-GenericError::GenericError(const std::string &Context)
+GenericError::GenericError(StringRef Context)
: GenericError(generic_error_code::unspecified, Context) {}
-GenericError::GenericError(generic_error_code C, const std::string &Context)
- : Code(C) {
+GenericError::GenericError(generic_error_code C, StringRef Context) : Code(C) {
ErrMsg = "PDB Error: ";
std::error_code EC = convertToErrorCode();
if (Code != generic_error_code::unspecified)
@@ -60,7 +59,7 @@ GenericError::GenericError(generic_error_code C, const std::string &Context)
void GenericError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
-const std::string &GenericError::getErrorMessage() const { return ErrMsg; }
+StringRef GenericError::getErrorMessage() const { return ErrMsg; }
std::error_code GenericError::convertToErrorCode() const {
return std::error_code(static_cast<int>(Code), *Category);