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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221740 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 165f8e4c33dd2310db9fa465b4927dace6d00c09..cbb2e05dd9dea26c1a84f6da8c08282db8f0de48 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 5becec370fd86d849c1b9b59e25e87560ea44a57..1a4eaec6ac0594f3a03ecdc99d053be879748552 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;
   }