llvm.org GIT mirror llvm / 550d791
Pass a MCSubtargetInfo down to the TargetStreamer creation. With this the target streamers will be able to know the target features that are in use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200135 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
11 changed file(s) with 19 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
125125 MCAsmBackend &TAB,
126126 raw_ostream &_OS,
127127 MCCodeEmitter *_Emitter,
128 const MCSubtargetInfo &STI,
128129 bool RelaxAll,
129130 bool NoExecStack);
130131 typedef MCStreamer *(*AsmStreamerCtorTy)(MCContext &Ctx,
417418 MCAsmBackend &TAB,
418419 raw_ostream &_OS,
419420 MCCodeEmitter *_Emitter,
421 const MCSubtargetInfo &STI,
420422 bool RelaxAll,
421423 bool NoExecStack) const {
422424 if (!MCObjectStreamerCtorFn)
423425 return 0;
424 return MCObjectStreamerCtorFn(*this, TT, Ctx, TAB, _OS, _Emitter,
426 return MCObjectStreamerCtorFn(*this, TT, Ctx, TAB, _OS, _Emitter, STI,
425427 RelaxAll, NoExecStack);
426428 }
427429
203203 if (MCE == 0 || MAB == 0)
204204 return true;
205205
206 AsmStreamer.reset(getTarget().createMCObjectStreamer(getTargetTriple(),
207 *Context, *MAB, Out,
208 MCE, hasMCRelaxAll(),
209 hasMCNoExecStack()));
206 AsmStreamer.reset(getTarget().createMCObjectStreamer(
207 getTargetTriple(), *Context, *MAB, Out, MCE, STI, hasMCRelaxAll(),
208 hasMCNoExecStack()));
210209 break;
211210 }
212211 case CGFT_Null:
277276 return true;
278277
279278 OwningPtr AsmStreamer;
280 AsmStreamer.reset(getTarget().createMCObjectStreamer(getTargetTriple(), *Ctx,
281 *MAB, Out, MCE,
282 hasMCRelaxAll(),
283 hasMCNoExecStack()));
279 AsmStreamer.reset(getTarget().createMCObjectStreamer(
280 getTargetTriple(), *Ctx, *MAB, Out, MCE, STI, hasMCRelaxAll(),
281 hasMCNoExecStack()));
284282
285283 // Create the AsmPrinter, which takes ownership of AsmStreamer if successful.
286284 FunctionPass *Printer = getTarget().createAsmPrinter(*this, *AsmStreamer);
9696 MCContext &Ctx, MCAsmBackend &MAB,
9797 raw_ostream &OS,
9898 MCCodeEmitter *Emitter,
99 const MCSubtargetInfo &STI,
99100 bool RelaxAll,
100101 bool NoExecStack) {
101102 Triple TheTriple(TT);
235235 MCContext &Ctx, MCAsmBackend &MAB,
236236 raw_ostream &OS,
237237 MCCodeEmitter *Emitter,
238 const MCSubtargetInfo &STI,
238239 bool RelaxAll,
239240 bool NoExecStack) {
240241 Triple TheTriple(TT);
129129 static MCStreamer *createMCStreamer(const Target &T, StringRef TT,
130130 MCContext &Context, MCAsmBackend &MAB,
131131 raw_ostream &OS, MCCodeEmitter *Emitter,
132 const MCSubtargetInfo &STI,
132133 bool RelaxAll, bool NoExecStack) {
133134 MCStreamer *S =
134135 createELFStreamer(Context, MAB, OS, Emitter, RelaxAll, NoExecStack);
145145 MCContext &Ctx, MCAsmBackend &MAB,
146146 raw_ostream &OS,
147147 MCCodeEmitter *Emitter,
148 const MCSubtargetInfo &STI,
148149 bool RelaxAll,
149150 bool NoExecStack) {
150151 if (Triple(TT).isOSDarwin())
8585 MCContext &Ctx, MCAsmBackend &MAB,
8686 raw_ostream &_OS,
8787 MCCodeEmitter *_Emitter,
88 const MCSubtargetInfo &STI,
8889 bool RelaxAll,
8990 bool NoExecStack) {
9091 return createELFStreamer(Ctx, MAB, _OS, _Emitter, false, false);
103103 static MCStreamer *createMCStreamer(const Target &T, StringRef TT,
104104 MCContext &Context, MCAsmBackend &MAB,
105105 raw_ostream &OS, MCCodeEmitter *Emitter,
106 bool RelaxAll, bool NoExecStack) {
106 const MCSubtargetInfo &STI, bool RelaxAll,
107 bool NoExecStack) {
107108 MCStreamer *S =
108109 createELFStreamer(Context, MAB, OS, Emitter, RelaxAll, NoExecStack);
109110 new SparcTargetELFStreamer(*S);
184184 MCAsmBackend &MAB,
185185 raw_ostream &OS,
186186 MCCodeEmitter *Emitter,
187 const MCSubtargetInfo &STI,
187188 bool RelaxAll,
188189 bool NoExecStack) {
189190 return createELFStreamer(Ctx, MAB, OS, Emitter, RelaxAll, NoExecStack);
360360 MCContext &Ctx, MCAsmBackend &MAB,
361361 raw_ostream &_OS,
362362 MCCodeEmitter *_Emitter,
363 const MCSubtargetInfo &STI,
363364 bool RelaxAll,
364365 bool NoExecStack) {
365366 Triple TheTriple(TT);
447447 MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
448448 MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU);
449449 Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB,
450 FOS, CE, RelaxAll,
450 FOS, CE, *STI, RelaxAll,
451451 NoExecStack));
452452 }
453453