diff options
| author | Reid Kleckner <rnk@google.com> | 2016-06-22 18:34:45 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2016-06-22 18:34:45 +0000 |
| commit | c4871eddb717c5e5a6579a8b6306ed371ecd6031 (patch) | |
| tree | f5d0a108c455318cc60519d2c909ebbd9b7da393 /clang/lib/CodeGen | |
| parent | 156a7239c15bd7b253ceddcc8719d6f71bc9cd9c (diff) | |
| download | bcm5719-llvm-c4871eddb717c5e5a6579a8b6306ed371ecd6031.tar.gz bcm5719-llvm-c4871eddb717c5e5a6579a8b6306ed371ecd6031.zip | |
[codeview] Set the new IntroducedVirtual debug info flag
llvm-svn: 273454
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 441135dc90d..5448d7b1c5d 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1195,6 +1195,15 @@ llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction( MicrosoftVTableContext::MethodVFTableLocation ML = CGM.getMicrosoftVTableContext().getMethodVFTableLocation(GD); VIndex = ML.Index; + + // CodeView only records the vftable offset in the class that introduces + // the virtual method. This is possible because, unlike Itanium, the MS + // C++ ABI does not include all virtual methods from non-primary bases in + // the vtable for the most derived class. For example, if C inherits from + // A and B, C's primary vftable will not include B's virtual methods. + if (Method->begin_overridden_methods() == Method->end_overridden_methods()) + Flags |= llvm::DINode::FlagIntroducedVirtual; + // FIXME: Pass down ML.VFPtrOffset and ML.VBTableIndex. The debugger needs // these to synthesize a call to a virtual method in a complex inheritance // hierarchy. |

