From 0fa206615ae25d3a9120a1d7e61667c88cba3ae1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 3 Oct 2004 19:34:18 +0000 Subject: [PATCH] Add initial support for variants git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16635 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Target.td | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Target/Target.td b/lib/Target/Target.td index 7219395769e..522a46cbc21 100644 --- a/lib/Target/Target.td +++ b/lib/Target/Target.td @@ -188,6 +188,14 @@ class AsmWriter { // InstFormatName - AsmWriters can specify the name of the format string to // print instructions with. string InstFormatName = "AsmString"; + + // Variant - AsmWriters can be of multiple different variants. Variants are + // used to support targets that need to emit assembly code in ways that are + // mostly the same for different targets, but have minor differences in + // syntax. If the asmstring contains {|} characters in them, this integer + // will specify which alternative to use. For example "{x|y|z}" with Variant + // == 1, will expand to "y". + int Variant = 0; } def DefaultAsmWriter : AsmWriter; @@ -207,8 +215,8 @@ class Target { // InstructionSet - Instruction set description for this target. InstrInfo InstructionSet; - // AssemblyWriter - The AsmWriter instance to use for this target. - AsmWriter AssemblyWriter = DefaultAsmWriter; + // AssemblyWriters - The AsmWriter instances available for this target. + list AssemblyWriters = [DefaultAsmWriter]; }