/// allocator supports it).
/// \return The allocated memory. Could be NULL.
inline void *operator new(size_t Bytes, llvm::MCContext &C,
- size_t Alignment = 8) LLVM_NOEXCEPT {
+ size_t Alignment = 8) noexcept {
return C.allocate(Bytes, Alignment);
}
/// \brief Placement delete companion to the new above.
/// invoking it directly; see the new operator for more details. This operator
/// is called implicitly by the compiler if a placement new expression using
/// the MCContext throws in the object constructor.
-inline void operator delete(void *Ptr, llvm::MCContext &C,
- size_t) LLVM_NOEXCEPT {
+inline void operator delete(void *Ptr, llvm::MCContext &C, size_t) noexcept {
C.deallocate(Ptr);
}
/// allocator supports it).
/// \return The allocated memory. Could be NULL.
inline void *operator new[](size_t Bytes, llvm::MCContext &C,
- size_t Alignment = 8) LLVM_NOEXCEPT {
+ size_t Alignment = 8) noexcept {
return C.allocate(Bytes, Alignment);
}
/// invoking it directly; see the new[] operator for more details. This operator
/// is called implicitly by the compiler if a placement new[] expression using
/// the MCContext throws in the object constructor.
-inline void operator delete[](void *Ptr, llvm::MCContext &C) LLVM_NOEXCEPT {
+inline void operator delete[](void *Ptr, llvm::MCContext &C) noexcept {
C.deallocate(Ptr);
}
#define LLVM_MSC_PREREQ(version) 0
#endif
-#if !defined(_MSC_VER) || defined(__clang__) || LLVM_MSC_PREREQ(1900)
-#define LLVM_NOEXCEPT noexcept
-#else
-#define LLVM_NOEXCEPT throw()
-#endif
-
/// \brief Does the compiler support ref-qualifiers for *this?
///
/// Sadly, this is separate from just rvalue reference support because GCC
unsigned int getType() const { return TypeID; }
void *operator new(size_t Size, BumpPtrAllocator &Alloc,
- size_t Alignment = 16) LLVM_NOEXCEPT {
+ size_t Alignment = 16) noexcept {
return Alloc.Allocate(Size, Alignment);
}
void operator delete(void *Ptr, BumpPtrAllocator &Alloc,
- size_t Size) LLVM_NOEXCEPT {
+ size_t Size) noexcept {
Alloc.Deallocate(Ptr, Size);
}
std::unique_ptr<Document> &Doc;
SMRange SourceRange;
- void operator delete(void *) LLVM_NOEXCEPT = delete;
+ void operator delete(void *) noexcept = delete;
~Node() = default;
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class BitcodeErrorCategoryType : public std::error_category {
- const char *name() const LLVM_NOEXCEPT override {
+ const char *name() const noexcept override {
return "llvm.bitcode";
}
std::string message(int IE) const override {
// deal with the Error value directly, rather than converting to error_code.
class CodeViewErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "llvm.codeview"; }
+ const char *name() const noexcept override { return "llvm.codeview"; }
std::string message(int Condition) const override {
switch (static_cast<cv_error_code>(Condition)) {
// deal with the Error value directly, rather than converting to error_code.
class MSFErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "llvm.msf"; }
+ const char *name() const noexcept override { return "llvm.msf"; }
std::string message(int Condition) const override {
switch (static_cast<msf_error_code>(Condition)) {
// deal with the Error value directly, rather than converting to error_code.
class DIAErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.dia"; }
+ const char *name() const noexcept override { return "llvm.pdb.dia"; }
std::string message(int Condition) const override {
switch (static_cast<dia_error_code>(Condition)) {
// 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)) {
// deal with the Error value directly, rather than converting to error_code.
class RawErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.raw"; }
+ const char *name() const noexcept override { return "llvm.pdb.raw"; }
std::string message(int Condition) const override {
switch (static_cast<raw_error_code>(Condition)) {
// deal with the Error value directly, rather than converting to error_code.
class OrcErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "orc"; }
+ const char *name() const noexcept override { return "orc"; }
std::string message(int condition) const override {
switch (static_cast<OrcErrorCode>(condition)) {
// deal with the Error value directly, rather than converting to error_code.
class RuntimeDyldErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "runtimedyld"; }
+ const char *name() const noexcept override { return "runtimedyld"; }
std::string message(int Condition) const override {
switch (static_cast<RuntimeDyldErrorCode>(Condition)) {
// deal with the Error value directly, rather than converting to error_code.
class _object_error_category : public std::error_category {
public:
- const char* name() const LLVM_NOEXCEPT override;
+ const char* name() const noexcept override;
std::string message(int ev) const override;
};
}
-const char *_object_error_category::name() const LLVM_NOEXCEPT {
+const char *_object_error_category::name() const noexcept {
return "llvm.object";
}
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class CoverageMappingErrorCategoryType : public std::error_category {
- const char *name() const LLVM_NOEXCEPT override { return "llvm.coveragemap"; }
+ const char *name() const noexcept override { return "llvm.coveragemap"; }
std::string message(int IE) const override {
return getCoverageMapErrString(static_cast<coveragemap_error>(IE));
}
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class InstrProfErrorCategoryType : public std::error_category {
- const char *name() const LLVM_NOEXCEPT override { return "llvm.instrprof"; }
+ const char *name() const noexcept override { return "llvm.instrprof"; }
std::string message(int IE) const override {
return getInstrProfErrString(static_cast<instrprof_error>(IE));
}
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class SampleProfErrorCategoryType : public std::error_category {
- const char *name() const LLVM_NOEXCEPT override { return "llvm.sampleprof"; }
+ const char *name() const noexcept override { return "llvm.sampleprof"; }
std::string message(int IE) const override {
sampleprof_error E = static_cast<sampleprof_error>(IE);
switch (E) {
// deal with the Error value directly, rather than converting to error_code.
class ErrorErrorCategory : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "Error"; }
+ const char *name() const noexcept override { return "Error"; }
std::string message(int condition) const override {
switch (static_cast<ErrorErrorCode>(condition)) {
// deal with the Error value directly, rather than converting to error_code.
class cxxdump_error_category : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override { return "llvm.cxxdump"; }
+ const char *name() const noexcept override { return "llvm.cxxdump"; }
std::string message(int ev) const override {
switch (static_cast<cxxdump_error>(ev)) {
case cxxdump_error::success:
// deal with the Error value directly, rather than converting to error_code.
class _readobj_error_category : public std::error_category {
public:
- const char* name() const LLVM_NOEXCEPT override;
+ const char* name() const noexcept override;
std::string message(int ev) const override;
};
} // namespace
-const char *_readobj_error_category::name() const LLVM_NOEXCEPT {
+const char *_readobj_error_category::name() const noexcept {
return "llvm.readobj";
}
// deal with the Error value directly, rather than converting to error_code.
class _obj2yaml_error_category : public std::error_category {
public:
- const char *name() const LLVM_NOEXCEPT override;
+ const char *name() const noexcept override;
std::string message(int ev) const override;
};
} // namespace
-const char *_obj2yaml_error_category::name() const LLVM_NOEXCEPT {
+const char *_obj2yaml_error_category::name() const noexcept {
return "obj2yaml";
}