diff options
author | Fangrui Song <i@maskray.me> | 2024-06-12 14:13:20 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-06-12 14:13:20 -0700 |
commit | 2cc4bc132cbcc76c5552cbc128830943ea596b3e (patch) | |
tree | d58434234e6a0b9eee485d476dd059fc3d4cc3ec /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | 2c6f4864d14402ab815c050caefb23196796694d (diff) | |
download | llvm-2cc4bc132cbcc76c5552cbc128830943ea596b3e.zip llvm-2cc4bc132cbcc76c5552cbc128830943ea596b3e.tar.gz llvm-2cc4bc132cbcc76c5552cbc128830943ea596b3e.tar.bz2 |
MCFragment: Initialize Offset to 0
After 9d0754ada5dbbc0c009bcc2f7824488419cc5530 ("[MC] Relax fragments
eagerly") removes the assert of Offset, it is no longer useful to
initialize the member to -1.
Now the symbol value estimate is more precise, which leads to slight
behavior change to layout-interdependency.s.
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index bf1ce76..ff0558b 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -300,7 +300,7 @@ void MCObjectStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) { // Assign all pending labels to offset 0 within the dummy "pending" // fragment. (They will all be reassigned to a real fragment in // flushPendingLabels()) - Symbol->setOffset(0); + assert(Symbol->getOffset() == 0); addPendingLabel(Symbol); } |