git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210748
91177308-0d34-0410-b5e6-
96231b3b80d8
-namespace {
-class raw_counting_ostream : public raw_ostream {
- uint64_t Count = 0;
-
- void write_impl(const char *, size_t size) override { Count += size; }
-
- uint64_t current_pos() const override { return Count; }
-
-public:
- ~raw_counting_ostream() { flush(); }
-};
-}
-
/// Store Linker Optimization Hint information (LOH).
class MCLOHDirective {
MCLOHType Kind;
/// Store Linker Optimization Hint information (LOH).
class MCLOHDirective {
MCLOHType Kind;
/// the given @p Layout.
uint64_t getEmitSize(const MachObjectWriter &ObjWriter,
const MCAsmLayout &Layout) const {
/// the given @p Layout.
uint64_t getEmitSize(const MachObjectWriter &ObjWriter,
const MCAsmLayout &Layout) const {
+ class raw_counting_ostream : public raw_ostream {
+ uint64_t Count = 0;
+
+ void write_impl(const char *, size_t size) override { Count += size; }
+
+ uint64_t current_pos() const override { return Count; }
+
+ public:
+ ~raw_counting_ostream() { flush(); }
+ };
+
raw_counting_ostream OutStream;
Emit_impl(OutStream, ObjWriter, Layout);
return OutStream.tell();
raw_counting_ostream OutStream;
Emit_impl(OutStream, ObjWriter, Layout);
return OutStream.tell();