diff options
author | Reid Kleckner <rnk@google.com> | 2018-12-17 21:49:35 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-12-17 21:49:35 +0000 |
commit | 94ee0728e5e8665821ecfc20c2441e4bfc4e0bf2 (patch) | |
tree | 3603350ed670e605c4bf3d3922de8588b773149c /llvm/lib/MC/MCCodeView.cpp | |
parent | b85b15d64acb303a56a79ad514d24d46fbe12612 (diff) | |
download | bcm5719-llvm-94ee0728e5e8665821ecfc20c2441e4bfc4e0bf2.tar.gz bcm5719-llvm-94ee0728e5e8665821ecfc20c2441e4bfc4e0bf2.zip |
[codeview] Flush labels before S_DEFRANGE* fragments
This was a pre-existing bug that could be triggered with assembly like
this:
.p2align 2
.LtmpN:
.cv_def_range "..."
I noticed this when attempting to change clang to emit aligned symbol
records.
llvm-svn: 349403
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 234b43e3d49..978ac789c31 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -432,13 +432,13 @@ void CodeViewContext::emitInlineLineTableForFunction(MCObjectStreamer &OS, OS.getCurrentSectionOnly()); } -void CodeViewContext::emitDefRange( +MCFragment *CodeViewContext::emitDefRange( MCObjectStreamer &OS, ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges, StringRef FixedSizePortion) { // Create and insert a fragment into the current section that will be encoded // later. - new MCCVDefRangeFragment(Ranges, FixedSizePortion, + return new MCCVDefRangeFragment(Ranges, FixedSizePortion, OS.getCurrentSectionOnly()); } |