diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-10-05 10:51:28 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-10-05 10:55:40 +0100 |
commit | e463b69736da8b0a950ecd937cf990401bdfcdeb (patch) | |
tree | 5e5ae63a38c61ffda4f97f5dbc03633374dff2b1 /clang/tools/driver/cc1_main.cpp | |
parent | 0a031f5c880690e794aad48487dafbb010342ea1 (diff) | |
download | llvm-e463b69736da8b0a950ecd937cf990401bdfcdeb.zip llvm-e463b69736da8b0a950ecd937cf990401bdfcdeb.tar.gz llvm-e463b69736da8b0a950ecd937cf990401bdfcdeb.tar.bz2 |
[Support] Change fatal_error_handler_t to take a const char* instead of std::string
https://commondatastorage.googleapis.com/chromium-browser-clang/llvm-include-analysis.html
Excessive use of the <string> header has a massive impact on compile time; its most commonly included via the ErrorHandling.h header, which has to be included in many key headers, impacting many source files that have no need for std::string.
As an initial step toward removing the <string> include from ErrorHandling.h, this patch proposes to update the fatal_error_handler_t handler to just take a raw const char* instead.
The next step will be to remove the report_fatal_error std::string variant, which will involve a lot of cleanup and better use of Twine/StringRef.
Differential Revision: https://reviews.llvm.org/D111049
Diffstat (limited to 'clang/tools/driver/cc1_main.cpp')
-rw-r--r-- | clang/tools/driver/cc1_main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/driver/cc1_main.cpp b/clang/tools/driver/cc1_main.cpp index 396d6ff..13fb80f 100644 --- a/clang/tools/driver/cc1_main.cpp +++ b/clang/tools/driver/cc1_main.cpp @@ -57,7 +57,7 @@ using namespace llvm::opt; // Main driver //===----------------------------------------------------------------------===// -static void LLVMErrorHandler(void *UserData, const std::string &Message, +static void LLVMErrorHandler(void *UserData, const char *Message, bool GenCrashDiag) { DiagnosticsEngine &Diags = *static_cast<DiagnosticsEngine*>(UserData); |