[lto] Don't lazy load metadata for now.

Summary:
At the very least we hit

    Assertion failed: (((Flags & RF_HaveUnmaterializedMetadata) || Node->isResolved()) && "Unexpected unresolved node"), function MapMetadataImpl, file /Users/Sean/pg/llvm/lib/Transforms/Utils/ValueMapper.cpp, line 375.

on the included test case.

We currently do things like parse the module twice to keep the
implementation minimal. I think it makes sense to add start with eager
loading for similar reasons.

Reviewers: rafael

Subscribers: ruiu, Bigcheese, llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D17982

llvm-svn: 263045
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index cd8c8d2..8e8d77f 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -132,7 +132,7 @@
       MemoryBuffer::getMemBuffer(F.MB, false);
   std::unique_ptr<Module> M =
       check(getLazyBitcodeModule(std::move(Buffer), Context,
-                                 /*ShouldLazyLoadMetadata*/ true));
+                                 /*ShouldLazyLoadMetadata*/ false));
   std::vector<GlobalValue *> Keep;
   for (SymbolBody *B : F.getSymbols()) {
     if (B->repl() != B)