[PATCH] X86AsmPrinter::GetCPISymbol() skip MSVC special case if outputting ELF for MCJIT

Andrew MacPherson andrew.macp at gmail.com
Tue Oct 21 02:48:20 PDT 2014


In release mode I get a crash in GetCPISymbol() and in Debug I get an assertion failure:

assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");

with this backtrace:

llvm::cast<llvm::MCSectionCOFF,llvm::MCSection const >(const llvm::MCSection * Val) Line 237
llvm::X86AsmPrinter::GetCPISymbol(unsigned int CPID) Line 562
llvm::AsmPrinter::EmitConstantPool() Line 1099
llvm::AsmPrinter::EmitFunctionHeader() Line 513
llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction & MF) Line 66
llvm::MachineFunctionPass::runOnFunction(llvm::Function & F) Line 34
llvm::FPPassManager::runOnFunction(llvm::Function & F) Line 1545
llvm::FPPassManager::runOnModule(llvm::Module & M) Line 1565
`anonymous namespace'::MPPassManager::runOnModule(llvm::Module & M) Line 1623
llvm::legacy::PassManagerImpl::run(llvm::Module & M) Line 1730
llvm::legacy::PassManager::run(llvm::Module & M) Line 1768
llvm::MCJIT::emitObject(llvm::Module * M) Line 161
llvm::MCJIT::generateCodeForModule(llvm::Module * M) Line 197
llvm::MCJIT::finalizeObject() Line 240
...

This is with LLVM 3.5, if there's anything else you'd like me to try just let me know.

http://reviews.llvm.org/D5773






More information about the llvm-commits mailing list