[polly] Replace report_fatal_error(std::string) uses with report_fatal_error(Twine)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 Oct 2021 12:32:18 +0000 (13:32 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 Oct 2021 12:32:57 +0000 (13:32 +0100)
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.

polly/lib/Analysis/ScopDetection.cpp

index 4dfcf34..045d0f9 100644 (file)
@@ -329,7 +329,8 @@ static bool doesStringMatchAnyRegex(StringRef Str,
 
     std::string Err;
     if (!R.isValid(Err))
-      report_fatal_error("invalid regex given as input to polly: " + Err, true);
+      report_fatal_error(Twine("invalid regex given as input to polly: ") + Err,
+                         true);
 
     if (R.match(Str))
       return true;