@@ -83,8 +83,8 @@ static CGDataAction Action;
8383static std::optional<CGDataFormat> OutputFormat;
8484static std::vector<std::string> InputFilenames;
8585
86- static void exitWithError (Twine Message, std::string Whence = " " ,
87- std::string Hint = " " ) {
86+ static void exitWithError (Twine Message, StringRef Whence = " " ,
87+ StringRef Hint = " " ) {
8888 WithColor::error ();
8989 if (!Whence.empty ())
9090 errs () << Whence << " : " ;
@@ -97,16 +97,16 @@ static void exitWithError(Twine Message, std::string Whence = "",
9797static void exitWithError (Error E, StringRef Whence = " " ) {
9898 if (E.isA <CGDataError>()) {
9999 handleAllErrors (std::move (E), [&](const CGDataError &IPE) {
100- exitWithError (IPE.message (), std::string ( Whence) );
100+ exitWithError (IPE.message (), Whence);
101101 });
102102 return ;
103103 }
104104
105- exitWithError (toString (std::move (E)), std::string ( Whence) );
105+ exitWithError (toString (std::move (E)), Whence);
106106}
107107
108108static void exitWithErrorCode (std::error_code EC, StringRef Whence = " " ) {
109- exitWithError (EC.message (), std::string ( Whence) );
109+ exitWithError (EC.message (), Whence);
110110}
111111
112112static int convert_main (int argc, const char *argv[]) {
0 commit comments