1 //===- CodeViewOStream.h ----------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLVM_DEBUGINFO_CODEVIEW_CODEVIEWOSTREAM_H 11 #define LLVM_DEBUGINFO_CODEVIEW_CODEVIEWOSTREAM_H 12 13 #include "llvm/DebugInfo/CodeView/CodeView.h" 14 #include "llvm/DebugInfo/CodeView/TypeIndex.h" 15 16 namespace llvm { 17 namespace codeview { 18 19 template <typename Writer> class CodeViewOStream { 20 private: 21 CodeViewOStream(const CodeViewOStream &) = delete; 22 CodeViewOStream &operator=(const CodeViewOStream &) = delete; 23 24 public: 25 typedef typename Writer::LabelType LabelType; 26 27 public: 28 explicit CodeViewOStream(Writer &W); 29 30 private: size()31 uint64_t size() const { return W.tell(); } 32 33 private: 34 Writer &W; 35 }; 36 } 37 } 38 39 #endif 40