[llvm] r244115 - -Wdeprecated-clean: Remove uses of throw() in favor of noexcept
David Blaikie
dblaikie at gmail.com
Wed Aug 5 13:38:58 PDT 2015
Author: dblaikie
Date: Wed Aug 5 15:38:57 2015
New Revision: 244115
URL: http://llvm.org/viewvc/llvm-project?rev=244115&view=rev
Log:
-Wdeprecated-clean: Remove uses of throw() in favor of noexcept
Modified:
llvm/trunk/include/llvm/MC/MCContext.h
llvm/trunk/include/llvm/Support/Compiler.h
llvm/trunk/include/llvm/Support/YAMLParser.h
Modified: llvm/trunk/include/llvm/MC/MCContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCContext.h?rev=244115&r1=244114&r2=244115&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCContext.h (original)
+++ llvm/trunk/include/llvm/MC/MCContext.h Wed Aug 5 15:38:57 2015
@@ -538,7 +538,7 @@ namespace llvm {
/// allocator supports it).
/// \return The allocated memory. Could be NULL.
inline void *operator new(size_t Bytes, llvm::MCContext &C,
- size_t Alignment = 8) throw() {
+ size_t Alignment = 8) LLVM_NOEXCEPT {
return C.allocate(Bytes, Alignment);
}
/// \brief Placement delete companion to the new above.
@@ -547,8 +547,8 @@ inline void *operator new(size_t Bytes,
/// 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)
- throw () {
+inline void operator delete(void *Ptr, llvm::MCContext &C,
+ size_t) LLVM_NOEXCEPT {
C.deallocate(Ptr);
}
@@ -571,8 +571,8 @@ inline void operator delete(void *Ptr, l
/// \param Alignment The alignment of the allocated memory (if the underlying
/// allocator supports it).
/// \return The allocated memory. Could be NULL.
-inline void *operator new[](size_t Bytes, llvm::MCContext& C,
- size_t Alignment = 8) throw() {
+inline void *operator new[](size_t Bytes, llvm::MCContext &C,
+ size_t Alignment = 8) LLVM_NOEXCEPT {
return C.allocate(Bytes, Alignment);
}
@@ -582,7 +582,7 @@ inline void *operator new[](size_t Bytes
/// 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) throw () {
+inline void operator delete[](void *Ptr, llvm::MCContext &C) LLVM_NOEXCEPT {
C.deallocate(Ptr);
}
Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=244115&r1=244114&r2=244115&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Wed Aug 5 15:38:57 2015
@@ -69,7 +69,7 @@
#if !defined(_MSC_VER) || defined(__clang__) || LLVM_MSC_PREREQ(1900)
#define LLVM_NOEXCEPT noexcept
#else
-#define LLVM_NOEXCEPT
+#define LLVM_NOEXCEPT throw()
#endif
/// \brief Does the compiler support ref-qualifiers for *this?
Modified: llvm/trunk/include/llvm/Support/YAMLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLParser.h?rev=244115&r1=244114&r2=244115&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLParser.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLParser.h Wed Aug 5 15:38:57 2015
@@ -145,11 +145,12 @@ public:
unsigned int getType() const { return TypeID; }
void *operator new(size_t Size, BumpPtrAllocator &Alloc,
- size_t Alignment = 16) throw() {
+ size_t Alignment = 16) LLVM_NOEXCEPT {
return Alloc.Allocate(Size, Alignment);
}
- void operator delete(void *Ptr, BumpPtrAllocator &Alloc, size_t Size) throw() {
+ void operator delete(void *Ptr, BumpPtrAllocator &Alloc,
+ size_t Size) LLVM_NOEXCEPT {
Alloc.Deallocate(Ptr, Size);
}
@@ -157,7 +158,7 @@ protected:
std::unique_ptr<Document> &Doc;
SMRange SourceRange;
- void operator delete(void *) throw() {}
+ void operator delete(void *) LLVM_NOEXCEPT {}
~Node() = default;
More information about the llvm-commits
mailing list