X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FYamlIO.rst;h=8e7afba51dcbb7a45e91aa0bc508bd0b33c49c57;hb=13230064236e0cb916cefddcd75bd55d9ce15c41;hp=ded17288af62943312caa827f1dfb644760ad684;hpb=ff2515ef2cb17f32b8a68f6b8b9719365f068295;p=oota-llvm.git diff --git a/docs/YamlIO.rst b/docs/YamlIO.rst index ded17288af6..8e7afba51dc 100644 --- a/docs/YamlIO.rst +++ b/docs/YamlIO.rst @@ -353,7 +353,7 @@ had the following bit flags defined: flagsRound = 8 }; - LLVM_YAML_UNIQUE_TYPE(MyFlags, uint32_t) + LLVM_YAML_STRONG_TYPEDEF(uint32_t, MyFlags) To support reading and writing of MyFlags, you specialize ScalarBitSetTraits<> on MyFlags and provide the bit values and their names. @@ -408,7 +408,7 @@ some time format (e.g. 4-May-2012 10:30pm). YAML I/O has a way to support custom formatting and parsing of scalar types by specializing ScalarTraits<> on your data type. When writing, YAML I/O will provide the native type and your specialization must create a temporary llvm::StringRef. When reading, -YAML I/O will provide a llvm::StringRef of scalar and your specialization +YAML I/O will provide an llvm::StringRef of scalar and your specialization must convert that to your native data type. An outline of a custom scalar type looks like: