OSDN Git Service

[codeview] Add DISubprogram::ThisAdjustment
authorReid Kleckner <rnk@google.com>
Fri, 1 Jul 2016 02:41:21 +0000 (02:41 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 1 Jul 2016 02:41:21 +0000 (02:41 +0000)
commitbd79db219faf00c2416805a705acebbf04f85815
treea517036d31e8ef8232a0db91ed9281ef1b8f3ec9
parentaf386368d0d329d4685955e9ad71fa18e5973a75
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274325 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/llvm/IR/DIBuilder.h
include/llvm/IR/DebugInfoMetadata.h
lib/AsmParser/LLParser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
lib/IR/AsmWriter.cpp
lib/IR/DIBuilder.cpp
lib/IR/DebugInfoMetadata.cpp
lib/IR/LLVMContextImpl.h
test/Assembler/disubprogram.ll
test/Bitcode/upgrade-subprogram-this.ll [new file with mode: 0644]
test/Bitcode/upgrade-subprogram-this.ll.bc [new file with mode: 0644]
test/DebugInfo/COFF/virtual-methods.ll [new file with mode: 0644]
unittests/IR/MetadataTest.cpp