Make TreePattern::error use Twine
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 11 Nov 2014 23:48:11 +0000 (23:48 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 11 Nov 2014 23:48:11 +0000 (23:48 +0000)
The underlying error function already uses a Twine,
and most of the uses build up strings.

llvm-svn: 221740

llvm/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/utils/TableGen/CodeGenDAGPatterns.h

index 165f8e4..cbb2e05 100644 (file)
@@ -1908,7 +1908,7 @@ TreePattern::TreePattern(Record *TheRec, TreePatternNode *Pat, bool isInput,
   Trees.push_back(Pat);
 }
 
-void TreePattern::error(const std::string &Msg) {
+void TreePattern::error(const Twine &Msg) {
   if (HasError)
     return;
   dump();
index 5becec3..1a4eaec 100644 (file)
@@ -597,7 +597,7 @@ public:
 
   /// error - If this is the first error in the current resolution step,
   /// print it and set the error flag.  Otherwise, continue silently.
-  void error(const std::string &Msg);
+  void error(const Twine &Msg);
   bool hasError() const {
     return HasError;
   }