[YAMLIO] Make line-wrapping configurable and test it.
[oota-llvm.git] / include / llvm / Support / YAMLTraits.h
index 6d934fe5128483e9dfbff9a3d2111b07700a6cc9..c04294a5e87a735b3bf79b3475d60f47d01afab3 100644 (file)
@@ -1114,7 +1114,7 @@ private:
 ///
 class Output : public IO {
 public:
-  Output(llvm::raw_ostream &, void *Ctxt=nullptr);
+  Output(llvm::raw_ostream &, void *Ctxt = nullptr, int WrapColumn = 70);
   ~Output() override;
 
   bool outputting() override;
@@ -1170,6 +1170,7 @@ private:
   };
 
   llvm::raw_ostream       &Out;
+  int                      WrapColumn;
   SmallVector<InState, 8>  StateStack;
   int                      Column;
   int                      ColumnAtFlowStart;