<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 8, 2015, at 12:32 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, May 8, 2015 at 11:18 AM, Adrian Prantl <span dir="ltr" class=""><<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi dexonsmith, dblaikie, echristo,<br class="">
<br class="">
This adds a DIExternalTypeRef debug metadata node to the IR that is meant to be emitted by Clang when referring to a type that is defined in a .pcm file. DIExternalTypeRef is a child of DICompositeTypeBase because it shares common traits such as the unique identifier.<br class=""></blockquote><div class=""><br class="">Could this be an attribute to the DIClassType/StructureType? (to emit the currently needed type unit references, we still should know the correct class/structure type tag) LLVM already knows to hash the ref identifier (mangled name) for the type unit identifier.<br class=""></div></div></div></div></div></blockquote><div><br class=""></div><div>That would rule out using it for other kinds of types such as subroutine types (probably not so important) and typedef types (maybe as bit more so).</div><div><br class=""></div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class="">- David<br class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="">
The idea how this is going to be used is that the frontend will discover that a type originates from an AST file and instead of and constructing a full DIType (and thus deserializing the type from the AST) it creates a DIExternalTypeRef with the tag type, mangled name and the .pcm file. The backend then can emit this as a split-DWARF-style forward declaration using DW_FORM_ref_sig8 (GDB) or as a string reference (LLDB) + and accelerator table entry.<br class="">
<br class="">
REPOSITORY<br class="">
  rL LLVM<br class="">
<br class="">
<a href="http://reviews.llvm.org/D9612" target="_blank" class="">http://reviews.llvm.org/D9612</a><br class="">
<br class="">
Files:<br class="">
  include/llvm/Bitcode/LLVMBitCodes.h<br class="">
  include/llvm/IR/DIBuilder.h<br class="">
  include/llvm/IR/DebugInfoMetadata.h<br class="">
  include/llvm/IR/Metadata.def<br class="">
  include/llvm/IR/Metadata.h<br class="">
  lib/AsmParser/LLParser.cpp<br class="">
  lib/Bitcode/Reader/BitcodeReader.cpp<br class="">
  lib/Bitcode/Writer/BitcodeWriter.cpp<br class="">
  lib/IR/AsmWriter.cpp<br class="">
  lib/IR/DIBuilder.cpp<br class="">
  lib/IR/DebugInfoMetadata.cpp<br class="">
  lib/IR/LLVMContextImpl.h<br class="">
  lib/IR/Verifier.cpp<br class="">
  test/Assembler/DIExternalTypeRef.ll<br class="">
<br class="">
EMAIL PREFERENCES<br class="">
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank" class="">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br class="">
</blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>