[llvm] r229938 - This needs to be a const variable so the two sides of the ternary
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed Feb 25 18:16:04 PST 2015
> On 2015 Feb 19, at 16:03, Eric Christopher <echristo at gmail.com> wrote:
>
> Author: echristo
> Date: Thu Feb 19 18:03:45 2015
> New Revision: 229938
>
> URL: http://llvm.org/viewvc/llvm-project?rev=229938&view=rev
> Log:
> This needs to be a const variable so the two sides of the ternary
> operator agree on type.
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp?rev=229938&r1=229937&r2=229938&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Feb 19 18:03:45 2015
> @@ -152,7 +152,8 @@ void AsmPrinter::EmitInlineAsm(StringRef
> // and not have a MachineFunction to initialize the TargetInstrInfo from and
> // we only need MCInstrInfo for asm parsing.
> std::unique_ptr<MCTargetAsmParser> TAP(TM.getTarget().createMCAsmParser(
> - *STI, *Parser, MII ? *MII : *TM.getTarget().createMCInstrInfo(),
> + *STI, *Parser, MII ? *MII : *static_cast<const MCInstrInfo *>(
Can this just be a `const_cast<>`?
> + TM.getTarget().createMCInstrInfo()),
> TM.Options.MCOptions));
> if (!TAP)
> report_fatal_error("Inline asm not supported by this streamer because"
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list