From: Alp Toker Date: Thu, 12 Jun 2014 04:27:37 +0000 (+0000) Subject: Avoid in-class initializer from r210747 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3299dee207027b1bdef4282bda31ca6c3cc8e6a4;p=oota-llvm.git Avoid in-class initializer from r210747 Turns out MSVC doesn't like this. Sorry for the noise! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210749 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/MC/MCLinkerOptimizationHint.h b/include/llvm/MC/MCLinkerOptimizationHint.h index 77bc0900365..50fd527ffe2 100644 --- a/include/llvm/MC/MCLinkerOptimizationHint.h +++ b/include/llvm/MC/MCLinkerOptimizationHint.h @@ -133,13 +133,14 @@ public: uint64_t getEmitSize(const MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const { class raw_counting_ostream : public raw_ostream { - uint64_t Count = 0; + uint64_t Count; 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() { flush(); } };