aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-07-01 02:41:21 +0000
committerReid Kleckner <rnk@google.com>2016-07-01 02:41:21 +0000
commitb5af11dfa3474363ff04494ad6cfb18ef8d067b5 (patch)
tree1fb8861cbe7618e77ad95a5a372c1318ee055de4 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parenta8576706e378ef10ea79ed381eddea0238a21353 (diff)
downloadllvm-b5af11dfa3474363ff04494ad6cfb18ef8d067b5.zip
llvm-b5af11dfa3474363ff04494ad6cfb18ef8d067b5.tar.gz
llvm-b5af11dfa3474363ff04494ad6cfb18ef8d067b5.tar.bz2
[codeview] Add DISubprogram::ThisAdjustment
Summary: This represents the adjustment applied to the implicit 'this' parameter in the prologue of a virtual method in the MS C++ ABI. The adjustment is always zero unless multiple inheritance is involved. This increases the size of DISubprogram by 8 bytes, unfortunately. The adjustment really is a signed 32-bit integer. If this size increase is too much, we could probably win it back by splitting out a subclass with info specific to virtual methods (virtuality, vindex, thisadjustment, containingType). Reviewers: aprantl, dexonsmith Subscribers: aaboud, amccarth, llvm-commits Differential Revision: http://reviews.llvm.org/D21614 llvm-svn: 274325
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 971d21e..d3174fd 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1543,6 +1543,7 @@ void ModuleBitcodeWriter::writeDISubprogram(const DISubprogram *N,
Record.push_back(VE.getMetadataOrNullID(N->getTemplateParams().get()));
Record.push_back(VE.getMetadataOrNullID(N->getDeclaration()));
Record.push_back(VE.getMetadataOrNullID(N->getVariables().get()));
+ Record.push_back(N->getThisAdjustment());
Stream.EmitRecord(bitc::METADATA_SUBPROGRAM, Record, Abbrev);
Record.clear();