[PATCH] [mips] Make the MipsAsmParser capable of knowing whether PIC mode is enabled or not.

Daniel Sanders Daniel.Sanders at imgtec.com
Tue Nov 11 02:22:44 PST 2014


> -----Original Message-----
> From: Rafael EspĂ­ndola [mailto:rafael.espindola at gmail.com]
> Sent: 11 November 2014 05:11
> To: reviews+D5626+public+2935595221bdaa44 at reviews.llvm.org
> Cc: Toma Tabacu; Daniel Sanders; llvm-commits
> Subject: Re: [PATCH] [mips] Make the MipsAsmParser capable of knowing
> whether PIC mode is enabled or not.
> 
> > It turns out that doing this causes crashes and while looking into it again
> we've noticed something strange. It seems MipsAsmParser::Parser shadows
> MCAsmParserExtension::Parser. As a result, calling getContext() (which
> returns getParser().getContext()) may crash when getParser().getContext()
> is fine. The difference seems to be that getContext() uses
> MCAsmParserExtension::getParser() and MCAsmParserExtension::Parser
> whereas getParser().getContext() uses MipsAsmParser::getParser() and
> MipsAsmParser::Parser. MipsAsmParser::Parser is initialized by the
> constructor but (I think) MCAsmParserExtension is not.
> >
> > @rafael: All the targets seem to do the same thing. Was it intentional?
> 
> It was a bug. Fixed in r221667.
> 
> Cheers,
> Rafael

Thanks




More information about the llvm-commits mailing list