diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-12 04:21:14 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-12 04:21:14 +0000 |
commit | 5303292b87c276b77f0c92d2b7de6164b470d7c6 (patch) | |
tree | d3a3cdc68b8872c6e5bcdcaff1a50bfbe64d440f | |
parent | 09d875f8ab1386a921a1cded0fd44246e24b72ea (diff) | |
download | llvm-5303292b87c276b77f0c92d2b7de6164b470d7c6.tar.gz llvm-5303292b87c276b77f0c92d2b7de6164b470d7c6.tar.bz2 llvm-5303292b87c276b77f0c92d2b7de6164b470d7c6.tar.xz |
Avoid anonymous namespace in header from r210747
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210748 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/MC/MCLinkerOptimizationHint.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/llvm/MC/MCLinkerOptimizationHint.h b/include/llvm/MC/MCLinkerOptimizationHint.h index 07016c959f..77bc090036 100644 --- a/include/llvm/MC/MCLinkerOptimizationHint.h +++ b/include/llvm/MC/MCLinkerOptimizationHint.h @@ -96,19 +96,6 @@ static inline int MCLOHIdToNbArgs(MCLOHType Kind) { return -1; } -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; @@ -145,6 +132,17 @@ public: /// 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(); |