[polly] f1be391 - [polly] Replace report_fatal_error(std::string) uses with report_fatal_error(Twine)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 05:34:02 PDT 2021


Author: Simon Pilgrim
Date: 2021-10-06T13:32:57+01:00
New Revision: f1be391bed5332a4926f1007790f7bd02a9d4bfa

URL: https://github.com/llvm/llvm-project/commit/f1be391bed5332a4926f1007790f7bd02a9d4bfa
DIFF: https://github.com/llvm/llvm-project/commit/f1be391bed5332a4926f1007790f7bd02a9d4bfa.diff

LOG: [polly] Replace report_fatal_error(std::string) uses with report_fatal_error(Twine)

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.

Added: 
    

Modified: 
    polly/lib/Analysis/ScopDetection.cpp

Removed: 
    


################################################################################
diff  --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 4dfcf34c5df74..045d0f9dbe7d2 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -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;


        


More information about the llvm-commits mailing list