[all-commits] [llvm/llvm-project] bf142f: MCObjectStreamer: assign MCSymbols in the dummy fr...
James Y Knight via All-commits
all-commits at lists.llvm.org
Sat Nov 16 06:52:31 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bf142fc43347d8a35a71f46f7dda7e2a0a992e0d
https://github.com/llvm/llvm-project/commit/bf142fc43347d8a35a71f46f7dda7e2a0a992e0d
Author: James Y Knight <jyknight at google.com>
Date: 2019-11-16 (Sat, 16 Nov 2019)
Changed paths:
M llvm/include/llvm/MC/MCELFStreamer.h
M llvm/include/llvm/MC/MCObjectStreamer.h
M llvm/lib/MC/MCELFStreamer.cpp
M llvm/lib/MC/MCObjectStreamer.cpp
M llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
M llvm/test/MC/AsmParser/assembler-expressions.s
Log Message:
-----------
MCObjectStreamer: assign MCSymbols in the dummy fragment to offset 0.
In MCObjectStreamer, when there is no current fragment, initially
symbols are created in a "pending" state and assigned to a dummy
empty fragment.
Previously, they were not being assigned an offset, and thus
evaluateAbsolute would fail if trying to evaluate an expression 'a -
b', where both 'a' and 'b' were in this pending state.
Also slightly refactored the EmitLabel overload which takes an
MCFragment for clarity.
Fixes: https://llvm.org/PR41825
Differential Revision: https://reviews.llvm.org/D70062
More information about the All-commits
mailing list