<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 11:18 AM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi dexonsmith, dblaikie, echristo,<br>
<br>
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></blockquote><div><br>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><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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>
<br>
REPOSITORY<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D9612" target="_blank">http://reviews.llvm.org/D9612</a><br>
<br>
Files:<br>
include/llvm/Bitcode/LLVMBitCodes.h<br>
include/llvm/IR/DIBuilder.h<br>
include/llvm/IR/DebugInfoMetadata.h<br>
include/llvm/IR/Metadata.def<br>
include/llvm/IR/Metadata.h<br>
lib/AsmParser/LLParser.cpp<br>
lib/Bitcode/Reader/BitcodeReader.cpp<br>
lib/Bitcode/Writer/BitcodeWriter.cpp<br>
lib/IR/AsmWriter.cpp<br>
lib/IR/DIBuilder.cpp<br>
lib/IR/DebugInfoMetadata.cpp<br>
lib/IR/LLVMContextImpl.h<br>
lib/IR/Verifier.cpp<br>
test/Assembler/DIExternalTypeRef.ll<br>
<br>
EMAIL PREFERENCES<br>
<a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</blockquote></div><br></div></div>