[PATCH] D46271: [CodeView] Improve debbuging of virtual base class member variables

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 10:32:33 PDT 2018


On Mon, Apr 30, 2018 at 9:43 AM Brock Wyma via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> wrote:

> bwyma created this revision.
> bwyma added reviewers: smerritt, rnk, zturner.
> Herald added subscribers: hiraditya, eraman, mehdi_amini.
>
> Right now the virtual base pointer offset for virtual bases is not
> implemented and hard-coded to zero in CodeViewDebug.cpp.  This patch passes
> the offset from clang to CodeView where it can be emitted.  The crux of the
> patch looks like this:
>
> - // FIXME: Emit VBPtrOffset when the frontend provides it.
> - unsigned VBPtrOffset = 0; +      unsigned VBPtrOffset =
> I->getVBPtrOffset();
>
> The rest of the source changes support embedding this single field in the
> IR and reading/writing it to bitcode.
>
> Inheritance is currently encoded in the IR as a DIDerivedType which is
> currently reused for several other purposes.  Four tests which have bitcode
> files containing a DIDerivedType needed to have the bitcode file updated.
> Three of these bitcode files were not marked in subversion as a binary
> file, so I also set the mime-type accordingly.
>

Bitcode files shouldn't generally need updating - because bitcode should be
backwards compatible (& indeed usually the only reason bitcode files are
checked in is to test and ensure that backwards compatibility guarantee is
met)


>
> The diglobalvariable.ll file did not appear to get updated to match
> changes made to diglobalvariable.bc when DIGlobalVariableExpression was
> added.  Since I had to regenerate the bitcode file anyways I also updated
> the ".ll" file accordingly.
>
>
> https://reviews.llvm.org/D46271
>
> Files:
>   llvm/include/llvm/IR/DIBuilder.h
>   llvm/include/llvm/IR/DebugInfoMetadata.h
>   llvm/lib/AsmParser/LLParser.cpp
>   llvm/lib/Bitcode/Reader/MetadataLoader.cpp
>   llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
>   llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
>   llvm/lib/IR/AsmWriter.cpp
>   llvm/lib/IR/DIBuilder.cpp
>   llvm/lib/IR/DebugInfoMetadata.cpp
>   llvm/lib/IR/LLVMContextImpl.h
>   llvm/test/Bitcode/diglobalvariable-3.8.ll
>   llvm/test/Bitcode/diglobalvariable-3.8.ll.bc
>   llvm/test/Bitcode/dityperefs-3.8.ll
>   llvm/test/Bitcode/dityperefs-3.8.ll.bc
>   llvm/test/Bitcode/upgrade-pointer-address-space.ll.bc
>   llvm/test/DebugInfo/COFF/inheritance.ll
>   llvm/test/ThinLTO/X86/Inputs/drop-debug-info.bc
>   llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
>   llvm/tools/clang/test/CodeGenCXX/debug-info-ms-vbase.cpp
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180430/871029fc/attachment.html>


More information about the llvm-commits mailing list