aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-06-27 19:44:37 -0700
committerFangrui Song <i@maskray.me>2024-06-27 19:44:37 -0700
commite48c4011ca80385573f1b92793c75dc98abb228f (patch)
tree8849ffba1ef2a7082653c0552c0582eb619a7c84 /llvm/lib/MC/MCStreamer.cpp
parent874b880fce8522b06c6cf73a76612a844e2eaf1b (diff)
downloadllvm-e48c4011ca80385573f1b92793c75dc98abb228f.zip
llvm-e48c4011ca80385573f1b92793c75dc98abb228f.tar.gz
llvm-e48c4011ca80385573f1b92793c75dc98abb228f.tar.bz2
[MC] Cache current fragment in MCStreamer
This eliminates indirection through `getCurrentSectionOnly()->curFragList()->Tail`.
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 582b3a6..cfc27be 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -105,6 +105,7 @@ void MCStreamer::reset() {
SymbolOrdering.clear();
SectionStack.clear();
SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());
+ CurFrag = nullptr;
}
raw_ostream &MCStreamer::getCommentOS() {