diff options
author | Fangrui Song <i@maskray.me> | 2021-07-28 09:31:14 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-07-28 09:31:14 -0700 |
commit | 6da3d8b19c32c76bb503b1a71fc167a0487ef200 (patch) | |
tree | bb382aee391f9bd0977e607f5e3db2d77c912cd0 /llvm/lib/Support/SmallVector.cpp | |
parent | 49f745f59cbe1eda4653d917cc7d8d0b586fc6a4 (diff) | |
download | llvm-6da3d8b19c32c76bb503b1a71fc167a0487ef200.zip llvm-6da3d8b19c32c76bb503b1a71fc167a0487ef200.tar.gz llvm-6da3d8b19c32c76bb503b1a71fc167a0487ef200.tar.bz2 |
[llvm] Replace LLVM_ATTRIBUTE_NORETURN with C++11 [[noreturn]]
[[noreturn]] can be used since Oct 2016 when the minimum compiler requirement was bumped to GCC 4.8/MSVC 2015.
Note: the definition of LLVM_ATTRIBUTE_NORETURN is kept for now.
Diffstat (limited to 'llvm/lib/Support/SmallVector.cpp')
-rw-r--r-- | llvm/lib/Support/SmallVector.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Support/SmallVector.cpp b/llvm/lib/Support/SmallVector.cpp index 0005f78..0e2378b 100644 --- a/llvm/lib/Support/SmallVector.cpp +++ b/llvm/lib/Support/SmallVector.cpp @@ -47,8 +47,7 @@ static_assert(sizeof(SmallVector<char, 0>) == /// Report that MinSize doesn't fit into this vector's size type. Throws /// std::length_error or calls report_fatal_error. -LLVM_ATTRIBUTE_NORETURN -static void report_size_overflow(size_t MinSize, size_t MaxSize); +[[noreturn]] static void report_size_overflow(size_t MinSize, size_t MaxSize); static void report_size_overflow(size_t MinSize, size_t MaxSize) { std::string Reason = "SmallVector unable to grow. Requested capacity (" + std::to_string(MinSize) + @@ -63,7 +62,7 @@ static void report_size_overflow(size_t MinSize, size_t MaxSize) { /// Report that this vector is already at maximum capacity. Throws /// std::length_error or calls report_fatal_error. -LLVM_ATTRIBUTE_NORETURN static void report_at_maximum_capacity(size_t MaxSize); +[[noreturn]] static void report_at_maximum_capacity(size_t MaxSize); static void report_at_maximum_capacity(size_t MaxSize) { std::string Reason = "SmallVector capacity unable to grow. Already at maximum size " + |