<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 30, 2018 at 9:43 AM Brock Wyma via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">bwyma created this revision.<br>
bwyma added reviewers: smerritt, rnk, zturner.<br>
Herald added subscribers: hiraditya, eraman, mehdi_amini.<br>
<br>
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:<br>
<br>
- // FIXME: Emit VBPtrOffset when the frontend provides it.<br>
- unsigned VBPtrOffset = 0; +      unsigned VBPtrOffset = I->getVBPtrOffset();<br>
<br>
The rest of the source changes support embedding this single field in the IR and reading/writing it to bitcode.<br>
<br>
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.<br></blockquote><div><br>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)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D46271" rel="noreferrer" target="_blank">https://reviews.llvm.org/D46271</a><br>
<br>
Files:<br>
  llvm/include/llvm/IR/DIBuilder.h<br>
  llvm/include/llvm/IR/DebugInfoMetadata.h<br>
  llvm/lib/AsmParser/LLParser.cpp<br>
  llvm/lib/Bitcode/Reader/MetadataLoader.cpp<br>
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp<br>
  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp<br>
  llvm/lib/IR/AsmWriter.cpp<br>
  llvm/lib/IR/DIBuilder.cpp<br>
  llvm/lib/IR/DebugInfoMetadata.cpp<br>
  llvm/lib/IR/LLVMContextImpl.h<br>
  llvm/test/Bitcode/diglobalvariable-3.8.ll<br>
  llvm/test/Bitcode/diglobalvariable-3.8.ll.bc<br>
  llvm/test/Bitcode/dityperefs-3.8.ll<br>
  llvm/test/Bitcode/dityperefs-3.8.ll.bc<br>
  llvm/test/Bitcode/upgrade-pointer-address-space.ll.bc<br>
  llvm/test/DebugInfo/COFF/inheritance.ll<br>
  llvm/test/ThinLTO/X86/Inputs/drop-debug-info.bc<br>
  llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp<br>
  llvm/tools/clang/test/CodeGenCXX/debug-info-ms-vbase.cpp<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>