aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenInstruction.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-01 01:07:14 +0000
committerChris Lattner <sabre@nondot.org>2010-11-01 01:07:14 +0000
commit4d43d0fd996a01c2cd21fd51082bc1bba783ef3c (patch)
tree298491062e0770e8dfce0b6ac96b2774916432f4 /utils/TableGen/CodeGenInstruction.h
parent52de0ef9220e321224fe092f82303bc027e8f418 (diff)
move FlattenVariants out of AsmMatcherEmitter into a shared
CodeGenInstruction::FlattenAsmStringVariants method. Use it to simplify the code in AsmWriterInst, which now no longer needs to worry about variants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.h')
-rw-r--r--utils/TableGen/CodeGenInstruction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h
index e895361d69..93d1ce1ddf 100644
--- a/utils/TableGen/CodeGenInstruction.h
+++ b/utils/TableGen/CodeGenInstruction.h
@@ -23,6 +23,7 @@ namespace llvm {
class Record;
class DagInit;
class CodeGenTarget;
+ class StringRef;
class CodeGenInstruction {
public:
@@ -201,6 +202,12 @@ namespace llvm {
/// MVT::Other.
MVT::SimpleValueType
HasOneImplicitDefWithKnownVT(const CodeGenTarget &TargetInfo) const;
+
+
+ /// FlattenAsmStringVariants - Flatten the specified AsmString to only
+ /// include text from the specified variant, returning the new string.
+ static std::string FlattenAsmStringVariants(StringRef AsmString,
+ unsigned Variant);
};
}