formatting cleanups, no functionality change.

llvm-svn: 79221
This commit is contained in:
Chris Lattner 2009-08-17 04:17:34 +00:00
parent 8710d9831b
commit 962c5bd803
1 changed files with 36 additions and 43 deletions

View File

@ -8,7 +8,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCStreamer.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInst.h"
@ -17,19 +16,15 @@
#include "llvm/MC/MCValue.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
namespace {
class MCAsmStreamer : public MCStreamer {
class MCAsmStreamer : public MCStreamer {
raw_ostream &OS;
AsmPrinter *Printer;
MCSection *CurSection;
public:
public:
MCAsmStreamer(MCContext &Context, raw_ostream &_OS, AsmPrinter *_AsmPrinter)
: MCStreamer(Context), OS(_OS), Printer(_AsmPrinter), CurSection(0) {}
~MCAsmStreamer() {}
@ -74,21 +69,19 @@ namespace {
virtual void Finish();
/// @}
};
};
}
} // end anonymous namespace.
/// Allow printing symbols directly to a raw_ostream with proper quoting.
static inline raw_ostream &operator<<(raw_ostream &os, const MCSymbol *S) {
S->print(os);
return os;
}
/// Allow printing values directly to a raw_ostream.
static inline raw_ostream &operator<<(raw_ostream &os, const MCValue &Value) {
Value.print(os);
return os;
}