[llvm] r236328 - Update YamlIO documentation for the ScalarTraits class.

Alex Lorenz arphaman at gmail.com
Fri May 1 11:20:24 PDT 2015


Author: arphaman
Date: Fri May  1 13:20:23 2015
New Revision: 236328

URL: http://llvm.org/viewvc/llvm-project?rev=236328&view=rev
Log:
Update YamlIO documentation for the ScalarTraits class.

This patch adds the missing context parameter to the
input and output methods in ScalarTraits.

Differential Revision: http://reviews.llvm.org/D9173

Modified:
    llvm/trunk/docs/YamlIO.rst

Modified: llvm/trunk/docs/YamlIO.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/YamlIO.rst?rev=236328&r1=236327&r2=236328&view=diff
==============================================================================
--- llvm/trunk/docs/YamlIO.rst (original)
+++ llvm/trunk/docs/YamlIO.rst Fri May  1 13:20:23 2015
@@ -456,10 +456,10 @@ looks like:
 
     template <>
     struct ScalarTraits<MyCustomType> {
-      static void output(const T &value, llvm::raw_ostream &out) {
+      static void output(const T &value, void*, llvm::raw_ostream &out) {
         out << value;  // do custom formatting here
       }
-      static StringRef input(StringRef scalar, T &value) {
+      static StringRef input(StringRef scalar, void*, T &value) {
         // do custom parsing here.  Return the empty string on success,
         // or an error message on failure.
         return StringRef();





More information about the llvm-commits mailing list