summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCCodeView.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-12-16 19:20:35 +0000
committerZachary Turner <zturner@google.com>2016-12-16 19:20:35 +0000
commita4e7dfbc16e6e9c786f01a325a3663e8028b4cc0 (patch)
treea579cb615b50f1202e5aa91a951578bc47f867a4 /llvm/lib/MC/MCCodeView.cpp
parent8662305bae83768a73057cd9f9e3b93df8c3a037 (diff)
downloadbcm5719-llvm-a4e7dfbc16e6e9c786f01a325a3663e8028b4cc0.tar.gz
bcm5719-llvm-a4e7dfbc16e6e9c786f01a325a3663e8028b4cc0.zip
[CodeView] Hook CodeViewRecordIO for reading/writing symbols.
This is the 3rd of 3 patches to get reading and writing of CodeView symbol and type records to use a single codepath. Differential Revision: https://reviews.llvm.org/D26427 llvm-svn: 289978
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r--llvm/lib/MC/MCCodeView.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp
index ac1acc08b0c..22bdba1ca2b 100644
--- a/llvm/lib/MC/MCCodeView.cpp
+++ b/llvm/lib/MC/MCCodeView.cpp
@@ -361,7 +361,9 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout,
// Exit early if our line table would produce an oversized InlineSiteSym
// record. Account for the ChangeCodeLength annotation emitted after the
// loop ends.
- size_t MaxBufferSize = MaxRecordLength - sizeof(InlineSiteSym::Hdr) - 8;
+ constexpr uint32_t InlineSiteSize = 12;
+ constexpr uint32_t AnnotationSize = 8;
+ size_t MaxBufferSize = MaxRecordLength - InlineSiteSize - AnnotationSize;
if (Buffer.size() >= MaxBufferSize)
break;
OpenPOWER on IntegriCloud