[clang] Fix ambiguous use of `report_fatal_error`.

`report_fatal_error` is overloaded on `StringRef` and `Twine &`, therefore passing a `std::string` argument leads to ambiguity as it is convertible to either type.

Reviewed By: gribozavr2, sgatev

Differential Revision: https://reviews.llvm.org/D132745
This commit is contained in:
Wei Yi Tee 2022-08-29 15:15:44 +00:00
parent e6345bf644
commit d346eb7bf0
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ SanitizerSpecialCaseList::createOrDie(const std::vector<std::string> &Paths,
std::string Error;
if (auto SSCL = create(Paths, VFS, Error))
return SSCL;
llvm::report_fatal_error(Error);
llvm::report_fatal_error(StringRef(Error));
}
void SanitizerSpecialCaseList::createSanitizerSections() {