aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCPseudoProbe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCPseudoProbe.cpp')
-rw-r--r--llvm/lib/MC/MCPseudoProbe.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCPseudoProbe.cpp b/llvm/lib/MC/MCPseudoProbe.cpp
index f87d27f..b493337 100644
--- a/llvm/lib/MC/MCPseudoProbe.cpp
+++ b/llvm/lib/MC/MCPseudoProbe.cpp
@@ -81,8 +81,9 @@ void MCPseudoProbe::emit(MCObjectStreamer *MCOS,
if (AddrDelta->evaluateAsAbsolute(Delta, MCOS->getAssemblerPtr())) {
MCOS->emitSLEB128IntValue(Delta);
} else {
- MCOS->insert(MCOS->getContext().allocFragment<MCPseudoProbeAddrFragment>(
- AddrDelta));
+ auto *F = MCOS->getCurrentFragment();
+ F->makeLEB(true, AddrDelta);
+ MCOS->newFragment();
}
} else {
// Emit the GUID of the split function that the sentinel probe represents.