diff options
Diffstat (limited to 'contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp')
-rw-r--r-- | contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp b/contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp index f71fc7830129..97f95418e054 100644 --- a/contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp +++ b/contrib/llvm/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(); } }; |