[PATCH] Remove const_cast for STI when parsing inline asm

Renato Golin renato.golin at linaro.org
Thu Feb 6 09:42:10 PST 2014



================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:451
@@ -450,5 +450,3 @@
   if (EndInfo == NULL || WasThumb != isThumb(*EndInfo)) {
     OutStreamer.EmitAssemblerFlag(WasThumb ? MCAF_Code16 : MCAF_Code32);
   }
----------------
David Peixotto wrote:
> Renato Golin wrote:
> > Why isn't this necessary any more?
> I assume you mean toggling feature in EndInfo? We do still need to emit the assembler flag to the OutStreamer.
> 
> We no longer need to modify the EndInfo because we created a new one to use for parsing the inlineasm and any changes made by the parser will not effect the SubtargetInfo stored in the TargetMachine that is used when generating the rest of the assembly.
> 
> Basically we now restore the subtarget info to the original state "for free".
Right, ok. LGTM too.


http://llvm-reviews.chandlerc.com/D2709

BRANCH
  ias

ARCANIST PROJECT
  llvm



More information about the llvm-commits mailing list