From f24b2619a2d22cf6cf9de4a621854d1701614d94 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 11 Nov 2014 23:48:11 +0000 Subject: [PATCH] Make TreePattern::error use Twine The underlying error function already uses a Twine, and most of the uses build up strings. llvm-svn: 221740 --- utils/TableGen/CodeGenDAGPatterns.cpp | 2 +- utils/TableGen/CodeGenDAGPatterns.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 165f8e4c33d..cbb2e05dd9d 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -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(); diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h index 5becec370fd..1a4eaec6ac0 100644 --- a/utils/TableGen/CodeGenDAGPatterns.h +++ b/utils/TableGen/CodeGenDAGPatterns.h @@ -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; }