Commit 0b067277 authored by Fangrui Song's avatar Fangrui Song
Browse files

[MC] Reject CFI advance_loc separated by a non-private label for Mach-O

Due to Mach-O's .subsections_via_symbols mechanism, non-private labels cannot
appear between .cfi_startproc/.cfi_endproc. Compilers do not produce such
labels, but hand-written assembly may. Give an error. Unfortunately,
emitDwarfAdvanceFrameAddr generated MCExpr doesn't have location
informatin.

Note: evaluateKnownAbsolute is to force folding A-B to a constant even if A and
B are separate by a non-private label. The function is a workaround for some
Mach-O assembler issues and should generally be avoided.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D153167
parent 5a1cdcbd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment