X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FYamlIO.rst;h=a5cb637dd7eb5c2a48d78e28f21b7efd22d4a4e1;hb=566fb9fe3ed767be7218fb1608ec6a284067d3b0;hp=ac50292f4a812f368748ef2caedf4d8fef6da63a;hpb=becdd3a5a94000177b8a32392bbac9888bbac992;p=oota-llvm.git diff --git a/docs/YamlIO.rst b/docs/YamlIO.rst index ac50292f4a8..a5cb637dd7e 100644 --- a/docs/YamlIO.rst +++ b/docs/YamlIO.rst @@ -109,7 +109,7 @@ ScalarEnumerationTraits on that type and define the enumeration() method: As with all YAML I/O template specializations, the ScalarEnumerationTraits is used for both reading and writing YAML. That is, the mapping between in-memory enum -values and the YAML string representation is only in place. +values and the YAML string representation is only in one place. This assures that the code for writing and parsing of YAML stays in sync. To specify a YAML mappings, you define a specialization on @@ -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. @@ -533,7 +533,7 @@ coordinates into polar when reading YAML. y(polar.distance * sin(polar.angle)) { } Polar denormalize(IO &) { - return Polar(sqrt(x*x+y*y, arctan(x,y)); + return Polar(sqrt(x*x+y*y), arctan(x,y)); } float x;