woruyu wrote: we can't use diagnostics in llvm-tools, so keep the overload function `std::string &Error`, which is called by llvm-cfi-verify.cpp or CodeCoverage.cpp ``` LLVM_ABI static std::unique_ptr<SpecialCaseList> create(const std::vector<std::string> &Paths, llvm::vfs::FileSystem &FS, std::string &Error);
// first in llvm-cfi-verify.cpp std::unique_ptr<SpecialCaseList> SpecialCaseList; if (IgnorelistFilename != "-") { std::string Error; SpecialCaseList = SpecialCaseList::create({IgnorelistFilename}, *vfs::getRealFileSystem(), Error); if (!SpecialCaseList) { errs() << "Failed to get ignorelist: " << Error << "\n"; exit(EXIT_FAILURE); } } // second in CodeCoverage.cpp // Read in -name-allowlist files. if (!NameFilterFiles.empty()) { std::string SpecialCaseListErr; NameAllowlist = SpecialCaseList::create( NameFilterFiles, *vfs::getRealFileSystem(), SpecialCaseListErr); if (!NameAllowlist) error(SpecialCaseListErr); } ``` https://github.com/llvm/llvm-project/pull/147959 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits