LLVM API Documentation
#include <YAMLTraits.h>
This class should be specialized by type that requires custom conversion to/from a yaml scalar. For example:
template<> struct ScalarTraits<MyType> { static void output(const MyType &val, void*, llvm::raw_ostream &out) { // stream out custom formatting out << llvm::format("%x", val); } static StringRef input(StringRef scalar, void*, MyType &value) { // parse scalar and set value
// return empty string on success, or error string return StringRef(); } };
Definition at line 103 of file YAMLTraits.h.