LLVM  8.0.0svn
GenericError.cpp
Go to the documentation of this file.
1 //===- Error.cpp - system_error extensions for PDB --------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
13 
14 using namespace llvm;
15 using namespace llvm::pdb;
16 
17 // FIXME: This class is only here to support the transition to llvm::Error. It
18 // will be removed once this transition is complete. Clients should prefer to
19 // deal with the Error value directly, rather than converting to error_code.
21 public:
22  const char *name() const noexcept override { return "llvm.pdb"; }
23  std::string message(int Condition) const override {
24  switch (static_cast<pdb_error_code>(Condition)) {
26  return "An unknown error has occurred.";
28  return "Type server PDB was not found.";
30  return "LLVM was not compiled with support for DIA. This usually means "
31  "that you are not using MSVC, or your Visual Studio "
32  "installation is corrupt.";
34  return "DIA is only supported when using MSVC.";
36  return "The PDB file path is an invalid UTF8 sequence.";
38  return "The signature does not match; the file(s) might be out of date.";
39  }
40  llvm_unreachable("Unrecognized generic_error_code");
41  }
42 };
43 
46 
47 char PDBError::ID;
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
const char * name() const noexcept override
std::string message(int Condition) const override
const std::error_category & PDBErrCategory()
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:74
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static llvm::ManagedStatic< PDBErrorCategory > PDBCategory
aarch64 promote const
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
Definition: ManagedStatic.h:61