[llvm] r273679 - Make sure Format is always initialized.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 06:47:30 PDT 2016
Author: rafael
Date: Fri Jun 24 08:47:29 2016
New Revision: 273679
URL: http://llvm.org/viewvc/llvm-project?rev=273679&view=rev
Log:
Make sure Format is always initialized.
Should fix the msan bots.
Modified:
llvm/trunk/lib/Object/Archive.cpp
Modified: llvm/trunk/lib/Object/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=273679&r1=273678&r2=273679&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Archive.cpp (original)
+++ llvm/trunk/lib/Object/Archive.cpp Fri Jun 24 08:47:29 2016
@@ -295,6 +295,11 @@ Archive::Archive(MemoryBufferRef Source,
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;
More information about the llvm-commits
mailing list