Make sure Format is always initialized.

Should fix the msan bots.

llvm-svn: 273679
This commit is contained in:
Rafael Espindola
2016-06-24 13:47:29 +00:00
parent fd342808e0
commit cc371201c3

View File

@@ -295,6 +295,11 @@ Archive::Archive(MemoryBufferRef Source, std::error_code &ec)
return;
child_iterator E = child_end();
// This is at least a valid empty archive. Since an empty archive is the
// same in all formats, just claim it to be gnu to make sure Format is
// initialized.
Format = K_GNU;
if (I == E) {
ec = std::error_code();
return;