mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
AsmPrinter.cpp: Avoid crashes for targeting like "arm-mingw32". CurrentFnSym might not be <MCSymbolELF> here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239692 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
82b72bed60
commit
145cdc632a
@ -902,7 +902,8 @@ void AsmPrinter::EmitFunctionBody() {
|
||||
const MCExpr *SizeExp = MCBinaryExpr::createSub(
|
||||
MCSymbolRefExpr::create(CurrentFnEnd, OutContext),
|
||||
MCSymbolRefExpr::create(CurrentFnSymForSize, OutContext), OutContext);
|
||||
OutStreamer->emitELFSize(cast<MCSymbolELF>(CurrentFnSym), SizeExp);
|
||||
if (auto Sym = dyn_cast<MCSymbolELF>(CurrentFnSym))
|
||||
OutStreamer->emitELFSize(Sym, SizeExp);
|
||||
}
|
||||
|
||||
for (const HandlerInfo &HI : Handlers) {
|
||||
|
Loading…
Reference in New Issue
Block a user