[llvm] d67935e - [Support] Update SmallVector report_fatal_error calls to use Twine and add missing implicit header dependency.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 5 09:05:13 PDT 2021
Author: Simon Pilgrim
Date: 2021-10-05T17:03:19+01:00
New Revision: d67935ed8e78e7ffef17b6f7193b4f11f52a143d
URL: https://github.com/llvm/llvm-project/commit/d67935ed8e78e7ffef17b6f7193b4f11f52a143d
DIFF: https://github.com/llvm/llvm-project/commit/d67935ed8e78e7ffef17b6f7193b4f11f52a143d.diff
LOG: [Support] Update SmallVector report_fatal_error calls to use Twine and add missing implicit header dependency.
Added:
Modified:
llvm/lib/Support/SmallVector.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/SmallVector.cpp b/llvm/lib/Support/SmallVector.cpp
index 61780e73e408..2d7721e4e1fb 100644
--- a/llvm/lib/Support/SmallVector.cpp
+++ b/llvm/lib/Support/SmallVector.cpp
@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/Twine.h"
#include <cstdint>
#ifdef LLVM_ENABLE_EXCEPTIONS
#include <stdexcept>
@@ -65,7 +66,7 @@ static void report_size_overflow(size_t MinSize, size_t MaxSize) {
#ifdef LLVM_ENABLE_EXCEPTIONS
throw std::length_error(Reason);
#else
- report_fatal_error(Reason);
+ report_fatal_error(Twine(Reason));
#endif
}
@@ -79,7 +80,7 @@ static void report_at_maximum_capacity(size_t MaxSize) {
#ifdef LLVM_ENABLE_EXCEPTIONS
throw std::length_error(Reason);
#else
- report_fatal_error(Reason);
+ report_fatal_error(Twine(Reason));
#endif
}
More information about the llvm-commits
mailing list