diff options
author | Fangrui Song <i@maskray.me> | 2024-06-12 19:53:43 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-06-12 19:53:43 -0700 |
commit | 90a23d3a5a843086124c4b9315ee6a7617965623 (patch) | |
tree | 1e5a0961dcff536498312ab1c0b9e3b30637ddaf /llvm/lib/MC | |
parent | 34aa6c5d9a1df7767d9758836c88ff26f72d0b05 (diff) | |
download | llvm-90a23d3a5a843086124c4b9315ee6a7617965623.zip llvm-90a23d3a5a843086124c4b9315ee6a7617965623.tar.gz llvm-90a23d3a5a843086124c4b9315ee6a7617965623.tar.bz2 |
[MC] Restore setOffset(0) in emitLabel
For bolt/test/runtime/X86/exceptions-pic.test, llvm-bolt seems to call
emitLabel twice and the assert will fail. Work around it after
2cc4bc132cbcc76c5552cbc128830943ea596b3e
Diffstat (limited to 'llvm/lib/MC')
-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 ff0558b..bf1ce76 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()) - assert(Symbol->getOffset() == 0); + Symbol->setOffset(0); addPendingLabel(Symbol); } |