aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenInstruction.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-11 18:03:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-11 18:03:24 +0000
commitd4f195999a7774611e5f9e457a86f14d5e257324 (patch)
treeb42b9fcb6b31623ba37362aee09417547ca4e244 /utils/TableGen/CodeGenInstruction.cpp
parente5dacc55ad0122eb4b8913955cf6339fa3ff2d6e (diff)
Reimplement getToken and SplitString as "StringRef helper functions"
- getToken is modeled after StringRef::split but it can split on multiple separator chars and skips leading seperators. - SplitString is a StringRef::split variant for more than 2 elements with the same behaviour as getToken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r--utils/TableGen/CodeGenInstruction.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp
index c69ce962ff..684431a6f4 100644
--- a/utils/TableGen/CodeGenInstruction.cpp
+++ b/utils/TableGen/CodeGenInstruction.cpp
@@ -14,6 +14,7 @@
#include "CodeGenInstruction.h"
#include "Record.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/STLExtras.h"
#include <set>
using namespace llvm;
@@ -224,7 +225,8 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
// Parse the DisableEncoding field.
std::string DisableEncoding = R->getValueAsString("DisableEncoding");
while (1) {
- std::string OpName = getToken(DisableEncoding, " ,\t");
+ std::string OpName;
+ tie(OpName, DisableEncoding) = getToken(DisableEncoding, " ,\t");
if (OpName.empty()) break;
// Figure out which operand this is.