<div dir="ltr">Hello Zachary,<br><br>This commit added broken test one of our builders:<br><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast</a><br>. . . <br>Failing Tests (2):<br> . . .<br> lld :: COFF/pdb-natvis.test<br><br>Please have a look?<br><br>The builder was already red and did not send notifications on this.<br><br>Thanks<br><br>Galina<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 19, 2018 at 12:53 PM, Zachary Turner via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: zturner<br>
Date: Mon Mar 19 12:53:51 2018<br>
New Revision: 327895<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=327895&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=327895&view=rev</a><br>
Log:<br>
Support embedding natvis files in PDBs.<br>
<br>
Natvis is a debug language supported by Visual Studio for<br>
specifying custom visualizers. The /NATVIS option is an<br>
undocumented link.exe flag which will take a .natvis file<br>
and "inject" it into the PDB. This way, you can ship the<br>
debug visualizers for a program along with the PDB, which<br>
is very useful for postmortem debugging.<br>
<br>
This is implemented by adding a new "named stream" to the<br>
PDB with a special name of /src/files/<natvis file name><br>
and simply copying the contents of the xml into this file.<br>
<br>
Additionally, we need to emit a single stream named<br>
/src/headerblock which contains a hash table of embedded<br>
files to records describing them.<br>
<br>
This patch adds this functionality, including the /NATVIS<br>
option to lld-link.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D44328" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D44328</a><br>
<br>
Added:<br>
lld/trunk/test/COFF/Inputs/<wbr>generic.yaml<br>
lld/trunk/test/COFF/Inputs/<wbr>natvis-1.natvis<br>
lld/trunk/test/COFF/Inputs/<wbr>natvis-2.natvis<br>
lld/trunk/test/COFF/Inputs/<wbr>natvis-3.natvis<br>
lld/trunk/test/COFF/pdb-<wbr>natvis.test<br>
Modified:<br>
lld/trunk/COFF/Config.h<br>
lld/trunk/COFF/Driver.cpp<br>
lld/trunk/COFF/Options.td<br>
lld/trunk/COFF/PDB.cpp<br>
lld/trunk/test/<a href="http://lit.cfg.py" rel="noreferrer" target="_blank">lit.cfg.py</a><br>
lld/trunk/test/<a href="http://lit.site.cfg.py.in" rel="noreferrer" target="_blank">lit.site.cfg.<wbr>py.in</a><br>
<br>
Modified: lld/trunk/COFF/Config.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Config.h?rev=327895&r1=327894&r2=327895&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/COFF/Config.<wbr>h?rev=327895&r1=327894&r2=<wbr>327895&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Config.h (original)<br>
+++ lld/trunk/COFF/Config.h Mon Mar 19 12:53:51 2018<br>
@@ -99,6 +99,7 @@ struct Configuration {<br>
bool DebugGHashes = false;<br>
bool ShowTiming = false;<br>
unsigned DebugTypes = static_cast<unsigned>(<wbr>DebugType::None);<br>
+ std::vector<std::string> NatvisFiles;<br>
llvm::SmallString<128> PDBPath;<br>
std::vector<llvm::StringRef> Argv;<br>
<br>
<br>
Modified: lld/trunk/COFF/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=327895&r1=327894&r2=327895&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/COFF/Driver.<wbr>cpp?rev=327895&r1=327894&r2=<wbr>327895&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Driver.cpp (original)<br>
+++ lld/trunk/COFF/Driver.cpp Mon Mar 19 12:53:51 2018<br>
@@ -933,9 +933,12 @@ void LinkerDriver::link(ArrayRef<<wbr>const c<br>
<br>
// Handle /pdb<br>
bool ShouldCreatePDB = Args.hasArg(OPT_debug, OPT_debug_ghash);<br>
- if (ShouldCreatePDB)<br>
+ if (ShouldCreatePDB) {<br>
if (auto *Arg = Args.getLastArg(OPT_pdb))<br>
Config->PDBPath = Arg->getValue();<br>
+ if (Args.hasArg(OPT_natvis))<br>
+ Config->NatvisFiles = Args.getAllArgValues(OPT_<wbr>natvis);<br>
+ }<br>
<br>
// Handle /noentry<br>
if (Args.hasArg(OPT_noentry)) {<br>
<br>
Modified: lld/trunk/COFF/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Options.td?rev=327895&r1=327894&r2=327895&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/COFF/<wbr>Options.td?rev=327895&r1=<wbr>327894&r2=327895&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Options.td (original)<br>
+++ lld/trunk/COFF/Options.td Mon Mar 19 12:53:51 2018<br>
@@ -45,6 +45,7 @@ def nodefaultlib : P<"nodefaultlib", "Re<br>
def opt : P<"opt", "Control optimizations">;<br>
def order : P<"order", "Put functions in order">;<br>
def out : P<"out", "Path to file to write output">;<br>
+def natvis : P<"natvis", "Path to natvis file to embed in the PDB">;<br>
def pdb : P<"pdb", "PDB file path">;<br>
def section : P<"section", "Specify section attributes">;<br>
def stack : P<"stack", "Size of the stack">;<br>
@@ -162,7 +163,6 @@ def delay : QF<"delay">;<br>
def errorreport : QF<"errorreport">;<br>
def idlout : QF<"idlout">;<br>
def maxilksize : QF<"maxilksize">;<br>
-def natvis : QF<"natvis">;<br>
def pdbaltpath : QF<"pdbaltpath">;<br>
def tlbid : QF<"tlbid">;<br>
def tlbout : QF<"tlbout">;<br>
<br>
Modified: lld/trunk/COFF/PDB.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=327895&r1=327894&r2=327895&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/COFF/PDB.<wbr>cpp?rev=327895&r1=327894&r2=<wbr>327895&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/PDB.cpp (original)<br>
+++ lld/trunk/COFF/PDB.cpp Mon Mar 19 12:53:51 2018<br>
@@ -90,6 +90,9 @@ public:<br>
/// Emit the basic PDB structure: initial streams, headers, etc.<br>
void initialize(const llvm::codeview::DebugInfo &BuildId);<br>
<br>
+ /// Add natvis files specified on the command line.<br>
+ void addNatvisFiles();<br>
+<br>
/// Link CodeView from each object file in the symbol table into the PDB.<br>
void addObjectsToPDB();<br>
<br>
@@ -961,6 +964,18 @@ void PDBLinker::addObjectsToPDB() {<br>
}<br>
}<br>
<br>
+void PDBLinker::addNatvisFiles() {<br>
+ for (StringRef File : Config->NatvisFiles) {<br>
+ ErrorOr<std::unique_ptr<<wbr>MemoryBuffer>> DataOrErr =<br>
+ MemoryBuffer::getFile(File);<br>
+ if (!DataOrErr) {<br>
+ warn("Cannot open input file: " + File);<br>
+ continue;<br>
+ }<br>
+ Builder.addInjectedSource(<wbr>File, std::move(*DataOrErr));<br>
+ }<br>
+}<br>
+<br>
static void addCommonLinkerModuleSymbols(<wbr>StringRef Path,<br>
pdb::<wbr>DbiModuleDescriptorBuilder &Mod,<br>
BumpPtrAllocator &Allocator) {<br>
@@ -1041,6 +1056,7 @@ void coff::createPDB(SymbolTable *Symtab<br>
PDB.initialize(BuildId);<br>
PDB.addObjectsToPDB();<br>
PDB.addSections(<wbr>OutputSections, SectionTable);<br>
+ PDB.addNatvisFiles();<br>
<br>
ScopedTimer T2(DiskCommitTimer);<br>
PDB.commit();<br>
<br>
Added: lld/trunk/test/COFF/Inputs/<wbr>generic.yaml<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/Inputs/generic.yaml?rev=327895&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/COFF/<wbr>Inputs/generic.yaml?rev=<wbr>327895&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/Inputs/<wbr>generic.yaml (added)<br>
+++ lld/trunk/test/COFF/Inputs/<wbr>generic.yaml Mon Mar 19 12:53:51 2018<br>
@@ -0,0 +1,282 @@<br>
+--- !COFF<br>
+header:<br>
+ Machine: IMAGE_FILE_MACHINE_AMD64<br>
+ Characteristics: [ ]<br>
+sections:<br>
+ - Name: .text<br>
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]<br>
+ Alignment: 16<br>
+ SectionData: 4883EC1831C0C74424140000000048<wbr>89542408894C24044883C418C3<br>
+ - Name: .data<br>
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_<wbr>DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]<br>
+ Alignment: 4<br>
+ SectionData: ''<br>
+ - Name: .bss<br>
+ Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_<wbr>DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]<br>
+ Alignment: 4<br>
+ SectionData: ''<br>
+ - Name: .xdata<br>
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_<wbr>DATA, IMAGE_SCN_MEM_READ ]<br>
+ Alignment: 4<br>
+ SectionData: '0104010004220000'<br>
+ - Name: .drectve<br>
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]<br>
+ Alignment: 1<br>
+ SectionData: 202F44454641554C544C49423A6C69<wbr>62636D742E6C6962202F4445464155<wbr>4C544C49423A6F6C646E616D65732E<wbr>6C6962<br>
+ - Name: '.debug$S'<br>
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_<wbr>DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]<br>
+ Alignment: 4<br>
+ SectionData: 04000000F10000002F0000002D003C<wbr>1101000000D0000700000000000000<wbr>581B000000000000636C616E672076<wbr>657273696F6E20372E302E30200000<wbr>F1000000760000002A004711000000<wbr>0000000000000000001C0000000000<wbr>000000000000031000000000000000<wbr>00006D61696E000D003E1174000000<wbr>01006172676300120045114F010000<wbr>0400000017000000000005000D003E<wbr>110010000001006172677600120045<wbr>114F01000008000000170000000000<wbr>050002004F110000F2000000280000<wbr>0000000000000000001C0000000000<wbr>0000020000001C0000000000000002<wbr>0000001700000003000000F4000000<wbr>1800000001000000100139E9A066A1<wbr>995A99DD01F5A392F26D7C0000F300<wbr>00003000000000443A5C7372635C6C<wbr>6C766D6275696C645C636C5C52656C<wbr>656173655C7836345C67656E657269<wbr>632E63707000000000<br>
+ Subsections:<br>
+ - !Symbols<br>
+ Records:<br>
+ - Kind: S_COMPILE3<br>
+ Compile3Sym:<br>
+ Flags: [ ]<br>
+ Machine: X64<br>
+ FrontendMajor: 7<br>
+ FrontendMinor: 0<br>
+ FrontendBuild: 0<br>
+ FrontendQFE: 0<br>
+ BackendMajor: 7000<br>
+ BackendMinor: 0<br>
+ BackendBuild: 0<br>
+ BackendQFE: 0<br>
+ Version: 'clang version 7.0.0 '<br>
+ - !Symbols<br>
+ Records:<br>
+ - Kind: S_GPROC32_ID<br>
+ ProcSym:<br>
+ CodeSize: 28<br>
+ DbgStart: 0<br>
+ DbgEnd: 0<br>
+ FunctionType: 4099<br>
+ Flags: [ ]<br>
+ DisplayName: main<br>
+ - Kind: S_LOCAL<br>
+ LocalSym:<br>
+ Type: 116<br>
+ Flags: [ IsParameter ]<br>
+ VarName: argc<br>
+ - Kind: S_DEFRANGE_REGISTER_REL<br>
+ DefRangeRegisterRelSym:<br>
+ Register: 335<br>
+ Flags: 0<br>
+ BasePointerOffset: 4<br>
+ Range:<br>
+ OffsetStart: 23<br>
+ ISectStart: 0<br>
+ Range: 5<br>
+ Gaps:<br>
+ - Kind: S_LOCAL<br>
+ LocalSym:<br>
+ Type: 4096<br>
+ Flags: [ IsParameter ]<br>
+ VarName: argv<br>
+ - Kind: S_DEFRANGE_REGISTER_REL<br>
+ DefRangeRegisterRelSym:<br>
+ Register: 335<br>
+ Flags: 0<br>
+ BasePointerOffset: 8<br>
+ Range:<br>
+ OffsetStart: 23<br>
+ ISectStart: 0<br>
+ Range: 5<br>
+ Gaps:<br>
+ - Kind: S_PROC_ID_END<br>
+ ScopeEndSym:<br>
+ - !Lines<br>
+ CodeSize: 28<br>
+ Flags: [ ]<br>
+ RelocOffset: 0<br>
+ RelocSegment: 0<br>
+ Blocks:<br>
+ - FileName: 'D:\src\llvmbuild\cl\Release\<wbr>x64\generic.cpp'<br>
+ Lines:<br>
+ - Offset: 0<br>
+ LineStart: 2<br>
+ IsStatement: false<br>
+ EndDelta: 0<br>
+ - Offset: 23<br>
+ LineStart: 3<br>
+ IsStatement: false<br>
+ EndDelta: 0<br>
+ Columns:<br>
+ - !FileChecksums<br>
+ Checksums:<br>
+ - FileName: 'D:\src\llvmbuild\cl\Release\<wbr>x64\generic.cpp'<br>
+ Kind: MD5<br>
+ Checksum: 39E9A066A1995A99DD01F5A392F26D<wbr>7C<br>
+ - !StringTable<br>
+ Strings:<br>
+ - 'D:\src\llvmbuild\cl\Release\<wbr>x64\generic.cpp'<br>
+ - ''<br>
+ - ''<br>
+ - ''<br>
+ Relocations:<br>
+ - VirtualAddress: 100<br>
+ SymbolName: main<br>
+ Type: IMAGE_REL_AMD64_SECREL<br>
+ - VirtualAddress: 104<br>
+ SymbolName: main<br>
+ Type: IMAGE_REL_AMD64_SECTION<br>
+ - VirtualAddress: 139<br>
+ SymbolName: .text<br>
+ Type: IMAGE_REL_AMD64_SECREL<br>
+ - VirtualAddress: 143<br>
+ SymbolName: .text<br>
+ Type: IMAGE_REL_AMD64_SECTION<br>
+ - VirtualAddress: 174<br>
+ SymbolName: .text<br>
+ Type: IMAGE_REL_AMD64_SECREL<br>
+ - VirtualAddress: 178<br>
+ SymbolName: .text<br>
+ Type: IMAGE_REL_AMD64_SECTION<br>
+ - VirtualAddress: 196<br>
+ SymbolName: main<br>
+ Type: IMAGE_REL_AMD64_SECREL<br>
+ - VirtualAddress: 200<br>
+ SymbolName: main<br>
+ Type: IMAGE_REL_AMD64_SECTION<br>
+ - Name: '.debug$T'<br>
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_<wbr>DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]<br>
+ Alignment: 4<br>
+ SectionData: 040000000A000210700600000C0001<wbr>000E00011202000000740000000010<wbr>00000E000810740000000000020001<wbr>100000120001160000000002100000<wbr>6D61696E00F3F2F1<br>
+ Types:<br>
+ - Kind: LF_POINTER<br>
+ Pointer:<br>
+ ReferentType: 1648<br>
+ Attrs: 65548<br>
+ - Kind: LF_ARGLIST<br>
+ ArgList:<br>
+ ArgIndices: [ 116, 4096 ]<br>
+ - Kind: LF_PROCEDURE<br>
+ Procedure:<br>
+ ReturnType: 116<br>
+ CallConv: NearC<br>
+ Options: [ None ]<br>
+ ParameterCount: 2<br>
+ ArgumentList: 4097<br>
+ - Kind: LF_FUNC_ID<br>
+ FuncId:<br>
+ ParentScope: 0<br>
+ FunctionType: 4098<br>
+ Name: main<br>
+ - Name: .pdata<br>
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_<wbr>DATA, IMAGE_SCN_MEM_READ ]<br>
+ Alignment: 4<br>
+ SectionData: 000000001C00000000000000<br>
+ Relocations:<br>
+ - VirtualAddress: 0<br>
+ SymbolName: main<br>
+ Type: IMAGE_REL_AMD64_ADDR32NB<br>
+ - VirtualAddress: 4<br>
+ SymbolName: main<br>
+ Type: IMAGE_REL_AMD64_ADDR32NB<br>
+ - VirtualAddress: 8<br>
+ SymbolName: .xdata<br>
+ Type: IMAGE_REL_AMD64_ADDR32NB<br>
+symbols:<br>
+ - Name: .text<br>
+ Value: 0<br>
+ SectionNumber: 1<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 28<br>
+ NumberOfRelocations: 0<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 594448369<br>
+ Number: 1<br>
+ - Name: .data<br>
+ Value: 0<br>
+ SectionNumber: 2<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 0<br>
+ NumberOfRelocations: 0<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 0<br>
+ Number: 2<br>
+ - Name: .bss<br>
+ Value: 0<br>
+ SectionNumber: 3<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 0<br>
+ NumberOfRelocations: 0<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 0<br>
+ Number: 3<br>
+ - Name: .xdata<br>
+ Value: 0<br>
+ SectionNumber: 4<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 8<br>
+ NumberOfRelocations: 0<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 1192424177<br>
+ Number: 4<br>
+ - Name: .drectve<br>
+ Value: 0<br>
+ SectionNumber: 5<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 48<br>
+ NumberOfRelocations: 0<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 149686238<br>
+ Number: 5<br>
+ - Name: '.debug$S'<br>
+ Value: 0<br>
+ SectionNumber: 6<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 324<br>
+ NumberOfRelocations: 8<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 4196717433<br>
+ Number: 6<br>
+ - Name: '.debug$T'<br>
+ Value: 0<br>
+ SectionNumber: 7<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 68<br>
+ NumberOfRelocations: 0<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 485351071<br>
+ Number: 7<br>
+ - Name: .pdata<br>
+ Value: 0<br>
+ SectionNumber: 8<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_NULL<br>
+ StorageClass: IMAGE_SYM_CLASS_STATIC<br>
+ SectionDefinition:<br>
+ Length: 12<br>
+ NumberOfRelocations: 3<br>
+ NumberOfLinenumbers: 0<br>
+ CheckSum: 722740324<br>
+ Number: 8<br>
+ - Name: main<br>
+ Value: 0<br>
+ SectionNumber: 1<br>
+ SimpleType: IMAGE_SYM_TYPE_NULL<br>
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION<br>
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL<br>
+...<br>
<br>
Added: lld/trunk/test/COFF/Inputs/<wbr>natvis-1.natvis<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/Inputs/natvis-1.natvis?rev=327895&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/COFF/<wbr>Inputs/natvis-1.natvis?rev=<wbr>327895&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/Inputs/<wbr>natvis-1.natvis (added)<br>
+++ lld/trunk/test/COFF/Inputs/<wbr>natvis-1.natvis Mon Mar 19 12:53:51 2018<br>
@@ -0,0 +1 @@<br>
+1st Natvis Test<br>
<br>
Added: lld/trunk/test/COFF/Inputs/<wbr>natvis-2.natvis<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/Inputs/natvis-2.natvis?rev=327895&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/COFF/<wbr>Inputs/natvis-2.natvis?rev=<wbr>327895&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/Inputs/<wbr>natvis-2.natvis (added)<br>
+++ lld/trunk/test/COFF/Inputs/<wbr>natvis-2.natvis Mon Mar 19 12:53:51 2018<br>
@@ -0,0 +1 @@<br>
+Second Natvis Test<br>
<br>
Added: lld/trunk/test/COFF/Inputs/<wbr>natvis-3.natvis<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/Inputs/natvis-3.natvis?rev=327895&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/COFF/<wbr>Inputs/natvis-3.natvis?rev=<wbr>327895&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/Inputs/<wbr>natvis-3.natvis (added)<br>
+++ lld/trunk/test/COFF/Inputs/<wbr>natvis-3.natvis Mon Mar 19 12:53:51 2018<br>
@@ -0,0 +1 @@<br>
+Third Natvis Test<br>
<br>
Added: lld/trunk/test/COFF/pdb-<wbr>natvis.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-natvis.test?rev=327895&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/COFF/<wbr>pdb-natvis.test?rev=327895&<wbr>view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/pdb-<wbr>natvis.test (added)<br>
+++ lld/trunk/test/COFF/pdb-<wbr>natvis.test Mon Mar 19 12:53:51 2018<br>
@@ -0,0 +1,26 @@<br>
+REQUIRES: diasdk<br>
+<br>
+RUN: yaml2obj %p/Inputs/generic.yaml > %t.obj<br>
+RUN: lld-link /DEBUG %t.obj /nodefaultlib /entry:main /NATVIS:%p/Inputs/natvis-1.<wbr>natvis \<br>
+RUN: /NATVIS:%p/Inputs/natvis-2.<wbr>natvis /NATVIS:%p/Inputs/natvis-3.<wbr>natvis /OUT:%t.exe \<br>
+RUN: /PDB:%t.pdb<br>
+RUN: llvm-pdbutil pretty -injected-sources -injected-source-content %t.pdb | FileCheck \<br>
+RUN: --check-prefix=CHECK-FIRST %s<br>
+RUN: llvm-pdbutil pretty -injected-sources -injected-source-content %t.pdb | FileCheck \<br>
+RUN: --check-prefix=CHECK-SECOND %s<br>
+RUN: llvm-pdbutil pretty -injected-sources -injected-source-content %t.pdb | FileCheck \<br>
+RUN: --check-prefix=CHECK-THIRD %s<br>
+<br>
+RUN: lld-link /DEBUG %t.obj /nodefaultlib /entry:main /NATVIS:%p/Inputs/test2.natvis \<br>
+RUN: /OUT:%t.exe /PDB:%t.pdb 2>&1 | FileCheck --check-prefix=CHECK-MISSING %s<br>
+<br>
+CHECK-FIRST: {{.*}}natvis-1.natvis (16 bytes): obj=<null>, vname={{.*}}natvis-1.natvis, crc=355285096, compression=None<br>
+CHECK-FIRST-NEXT: 1st Natvis Test<br>
+<br>
+CHECK-SECOND: {{.*}}natvis-2.natvis (19 bytes): obj=<null>, vname={{.*}}natvis-2.natvis, crc=4252640062, compression=None<br>
+CHECK-SECOND-NEXT: Second Natvis Test<br>
+<br>
+CHECK-THIRD: {{.*}}natvis-3.natvis (18 bytes): obj=<null>, vname={{.*}}natvis-3.natvis, crc=2069719849, compression=None<br>
+CHECK-THIRD-NEXT: Third Natvis Test<br>
+<br>
+CHECK-MISSING: Cannot open input file: {{.*}}test2.natvis<br>
\ No newline at end of file<br>
<br>
Modified: lld/trunk/test/<a href="http://lit.cfg.py" rel="noreferrer" target="_blank">lit.cfg.py</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg.py?rev=327895&r1=327894&r2=327895&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/lit.<wbr>cfg.py?rev=327895&r1=327894&<wbr>r2=327895&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/<a href="http://lit.cfg.py" rel="noreferrer" target="_blank">lit.cfg.py</a> (original)<br>
+++ lld/trunk/test/<a href="http://lit.cfg.py" rel="noreferrer" target="_blank">lit.cfg.py</a> Mon Mar 19 12:53:51 2018<br>
@@ -85,6 +85,9 @@ if (lit.util.which('cvtres', config.envi<br>
if (config.llvm_libxml2_enabled == '1'):<br>
config.available_features.add(<wbr>'libxml2')<br>
<br>
+if config.have_dia_sdk:<br>
+ config.available_features.add(<wbr>"diasdk")<br>
+<br>
tar_executable = lit.util.which('tar', config.environment['PATH'])<br>
if tar_executable:<br>
tar_version = subprocess.Popen(<br>
<br>
Modified: lld/trunk/test/<a href="http://lit.site.cfg.py.in" rel="noreferrer" target="_blank">lit.site.cfg.<wbr>py.in</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.site.cfg.py.in?rev=327895&r1=327894&r2=327895&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/lit.<wbr>site.cfg.py.in?rev=327895&r1=<wbr>327894&r2=327895&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/<a href="http://lit.site.cfg.py.in" rel="noreferrer" target="_blank">lit.site.cfg.<wbr>py.in</a> (original)<br>
+++ lld/trunk/test/<a href="http://lit.site.cfg.py.in" rel="noreferrer" target="_blank">lit.site.cfg.<wbr>py.in</a> Mon Mar 19 12:53:51 2018<br>
@@ -1,5 +1,6 @@<br>
@LIT_SITE_CFG_IN_HEADER@<br>
<br>
+config.have_dia_sdk = "@LLVM_ENABLE_DIA_SDK@"<br>
config.llvm_src_root = "@LLVM_SOURCE_DIR@"<br>
config.llvm_obj_root = "@LLVM_BINARY_DIR@"<br>
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>