diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /lib/MC/MCLinkerOptimizationHint.cpp | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Diffstat (limited to 'lib/MC/MCLinkerOptimizationHint.cpp')
-rw-r--r-- | lib/MC/MCLinkerOptimizationHint.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/MC/MCLinkerOptimizationHint.cpp b/lib/MC/MCLinkerOptimizationHint.cpp index f71fc7830129..97f95418e054 100644 --- a/lib/MC/MCLinkerOptimizationHint.cpp +++ b/lib/MC/MCLinkerOptimizationHint.cpp @@ -1,4 +1,4 @@ -//===-- llvm/MC/MCLinkerOptimizationHint.cpp ----- LOH handling -*- C++ -*-===// +//===- llvm/MC/MCLinkerOptimizationHint.cpp ----- LOH handling ------------===// // // The LLVM Compiler Infrastructure // @@ -9,9 +9,11 @@ #include "llvm/MC/MCLinkerOptimizationHint.h" #include "llvm/MC/MCAsmLayout.h" -#include "llvm/MC/MCAssembler.h" #include "llvm/MC/MCMachObjectWriter.h" #include "llvm/Support/LEB128.h" +#include "llvm/Support/raw_ostream.h" +#include <cstddef> +#include <cstdint> using namespace llvm; @@ -41,14 +43,14 @@ void MCLOHDirective::emit(MachObjectWriter &ObjWriter, uint64_t MCLOHDirective::getEmitSize(const MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const { class raw_counting_ostream : public raw_ostream { - uint64_t Count; + 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() : Count(0) {} + raw_counting_ostream() = default; ~raw_counting_ostream() override { flush(); } }; |