mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Fixed a crash in llvm-mc for Mach-O when a symbol difference expression uses a
symbol from an assignment. In this case the symbol did not have a fragment so MCObjectWriter::IsSymbolRefDifferenceFullyResolved() should not have been calling IsSymbolRefDifferenceFullyResolvedImpl() with a NULL fragment and should just have returned false in that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149442 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -68,6 +68,8 @@ MCObjectWriter::IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
|
||||
|
||||
const MCSymbolData &DataA = Asm.getSymbolData(SA);
|
||||
const MCSymbolData &DataB = Asm.getSymbolData(SB);
|
||||
if(!DataA.getFragment() || !DataB.getFragment())
|
||||
return false;
|
||||
|
||||
return IsSymbolRefDifferenceFullyResolvedImpl(Asm, DataA,
|
||||
*DataB.getFragment(),
|
||||
|
||||
Reference in New Issue
Block a user