<div dir="ltr">I think we just need to add an llvm::consumeError(EC); on both of those lines before they return failure.  Sorry for missing this.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 12, 2018 at 3:27 PM Jason Molenda <<a href="mailto:jmolenda@apple.com">jmolenda@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ah, mystery solved.  The lit test specifies REQUIRES Darwin.  <br>
<br>
> On Oct 12, 2018, at 3:22 PM, Jason Molenda <<a href="mailto:jmolenda@apple.com" target="_blank">jmolenda@apple.com</a>> wrote:<br>
> <br>
> <br>
> <br>
>> On Oct 12, 2018, at 12:47 PM, Zachary Turner via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br>
>> <br>
>> Resubmit "Add SymbolFileNativePDB plugin."<br>
>> <br>
>> This was originally reverted due to some test failures on<br>
>> Linux.  Those problems turned out to require several additional<br>
>> patches to lld and clang in order to fix, which have since been<br>
>> submitted.  This patch is resubmitted unchanged.  All tests now<br>
>> pass on both Linux and Windows.<br>
> <br>
> <br>
> The lit test in lit/Modules/lc_build_version.yaml fails on Darwin systems, crashing here -<br>
> <br>
> 4   lldb-test                         0x00000001008ebdab llvm::Error::fatalUncheckedError() const + 139<br>
> 5   lldb-test                         0x000000010084b307 llvm::Error::assertIsChecked() + 87 (Error.h:270)<br>
> 6   lldb-test                         0x000000010084b279 llvm::Error::~Error() + 25 (Error.h:230)<br>
> 7   lldb-test                         0x0000000100844725 llvm::Error::~Error() + 21 (Error.h:231)<br>
> 8   lldb-test                         0x0000000101b91e49 loadPDBFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&) + 1193 (SymbolFileNativePDB.cpp:73)<br>
> 9   lldb-test                         0x0000000101b9024e lldb_private::npdb::SymbolFileNativePDB::CalculateAbilities() + 542 (SymbolFileNativePDB.cpp:187)<br>
> 10  lldb-test                         0x0000000101060ceb lldb_private::SymbolFile::GetAbilities() + 43 (SymbolFile.h:87)<br>
> 11  lldb-test                         0x00000001010607fc lldb_private::SymbolFile::FindPlugin(lldb_private::ObjectFile*) + 764 (SymbolFile.cpp:58)<br>
> <br>
> <br>
> Where the loadPDBFile line 73 is <br>
> <br>
> <br>
>    59  static std::unique_ptr<PDBFile> loadPDBFile(std::string PdbPath,<br>
>    60                                              llvm::BumpPtrAllocator &Allocator) {<br>
>    61    llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> ErrorOrBuffer =<br>
>    62        llvm::MemoryBuffer::getFile(PdbPath, /*FileSize=*/-1,<br>
>    63                                    /*RequiresNullTerminator=*/false);<br>
>    64    if (!ErrorOrBuffer)<br>
>    65      return nullptr;<br>
>    66    std::unique_ptr<llvm::MemoryBuffer> Buffer = std::move(*ErrorOrBuffer);<br>
>    67  <br>
>    68    llvm::StringRef Path = Buffer->getBufferIdentifier();<br>
>    69    auto Stream = llvm::make_unique<llvm::MemoryBufferByteStream>(<br>
>    70        std::move(Buffer), llvm::support::little);<br>
>    71  <br>
>    72    auto File = llvm::make_unique<PDBFile>(Path, std::move(Stream), Allocator);<br>
>    73    if (auto EC = File->parseFileHeaders())<br>
>    74      return nullptr;<br>
>    75    if (auto EC = File->parseStreamData())<br>
> <br>
> <br>
> I'm not sure why this wouldn't fail on a linux/windows system.  The point of the .yaml lit tests was that it is host independent?<br>
> <br>
> <br>
> J<br>
<br>
</blockquote></div>