From 7bcaec83bef146a4f3d5533f7eb584e795e8348d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 6 Nov 2015 19:57:37 +0000 Subject: [PATCH] Fix a few windows only tests. This argument must be non-null. llvm-svn: 252336 --- lld/COFF/DriverUtils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp index 9e46e8233a55..391a8ab66420 100644 --- a/lld/COFF/DriverUtils.cpp +++ b/lld/COFF/DriverUtils.cpp @@ -572,7 +572,9 @@ public: P += Sym.size() + 1; memcpy(P, DLLName.data(), DLLName.size()); - object::Archive::Child C(Parent, Buf, nullptr); + std::error_code EC; + object::Archive::Child C(Parent, Buf, &EC); + assert(!EC && "We created an invalid buffer"); return NewArchiveIterator(C, DLLName); }