diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-17 04:23:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-17 04:23:44 +0000 |
commit | f3ce009fcb0a04a245c437d86657e9bd61ecc18f (patch) | |
tree | 52550e36a463fe4346fe0352f00073defb08db30 /lib | |
parent | 46a947d8c191e5c218e736330c9d4d59ac4bcab3 (diff) | |
download | external_llvm-f3ce009fcb0a04a245c437d86657e9bd61ecc18f.zip external_llvm-f3ce009fcb0a04a245c437d86657e9bd61ecc18f.tar.gz external_llvm-f3ce009fcb0a04a245c437d86657e9bd61ecc18f.tar.bz2 |
give MCAsmStreamer a TargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79222 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 02ff2f0..d46043b 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -59,7 +59,7 @@ AsmPrinter::AsmPrinter(formatted_raw_ostream &o, TargetMachine &tm, TM(tm), TAI(T), TRI(tm.getRegisterInfo()), OutContext(*new MCContext()), - OutStreamer(*createAsmStreamer(OutContext, O)), + OutStreamer(*createAsmStreamer(OutContext, O, *T, this)), LastMI(0), LastFn(0), Counter(~0U), PrevDLT(0, ~0U, ~0U) { diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 0eed120..db39fb8 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -22,11 +22,14 @@ namespace { class MCAsmStreamer : public MCStreamer { raw_ostream &OS; + const TargetAsmInfo &TAI; AsmPrinter *Printer; MCSection *CurSection; public: - MCAsmStreamer(MCContext &Context, raw_ostream &_OS, AsmPrinter *_AsmPrinter) - : MCStreamer(Context), OS(_OS), Printer(_AsmPrinter), CurSection(0) {} + MCAsmStreamer(MCContext &Context, raw_ostream &_OS, const TargetAsmInfo &tai, + AsmPrinter *_AsmPrinter) + : MCStreamer(Context), OS(_OS), TAI(tai), Printer(_AsmPrinter), + CurSection(0) {} ~MCAsmStreamer() {} /// @name MCStreamer Interface @@ -293,6 +296,6 @@ void MCAsmStreamer::Finish() { } MCStreamer *llvm::createAsmStreamer(MCContext &Context, raw_ostream &OS, - AsmPrinter *AP) { - return new MCAsmStreamer(Context, OS, AP); + const TargetAsmInfo &TAI, AsmPrinter *AP) { + return new MCAsmStreamer(Context, OS, TAI, AP); } |