[llvm] r221740 - Make TreePattern::error use Twine
Matt Arsenault
Matthew.Arsenault at amd.com
Tue Nov 11 15:48:11 PST 2014
Author: arsenm
Date: Tue Nov 11 17:48:11 2014
New Revision: 221740
URL: http://llvm.org/viewvc/llvm-project?rev=221740&view=rev
Log:
Make TreePattern::error use Twine
The underlying error function already uses a Twine,
and most of the uses build up strings.
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=221740&r1=221739&r2=221740&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Nov 11 17:48:11 2014
@@ -1908,7 +1908,7 @@ TreePattern::TreePattern(Record *TheRec,
Trees.push_back(Pat);
}
-void TreePattern::error(const std::string &Msg) {
+void TreePattern::error(const Twine &Msg) {
if (HasError)
return;
dump();
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h?rev=221740&r1=221739&r2=221740&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Tue Nov 11 17:48:11 2014
@@ -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;
}
More information about the llvm-commits
mailing list