mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-19 02:25:01 +00:00
YAMLIO: Allow scalars to dictate quotation rules
Introduce ScalarTraits::mustQuote which determines whether or not a StringRef needs quoting before it is acceptable to output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205955 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -162,12 +162,14 @@ template <> struct ScalarTraits<MCModuleYAML::Operand> {
|
||||
static void output(const MCModuleYAML::Operand &, void *,
|
||||
llvm::raw_ostream &);
|
||||
static StringRef input(StringRef, void *, MCModuleYAML::Operand &);
|
||||
static bool mustQuote(StringRef) { return false; }
|
||||
};
|
||||
|
||||
template <> struct ScalarTraits<MCModuleYAML::OpcodeEnum> {
|
||||
static void output(const MCModuleYAML::OpcodeEnum &, void *,
|
||||
llvm::raw_ostream &);
|
||||
static StringRef input(StringRef, void *, MCModuleYAML::OpcodeEnum &);
|
||||
static bool mustQuote(StringRef) { return false; }
|
||||
};
|
||||
|
||||
void ScalarEnumerationTraits<MCAtom::AtomKind>::enumeration(
|
||||
|
Reference in New Issue
Block a user