Avoid anonymous namespace in header from r210747
llvm-svn: 210748
This commit is contained in:
parent
3ba7673e34
commit
fc5f017894
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue