Fix a missing includes and a use of the MSVC promise/future workaround that
were left out of r343011/r343012.

llvm-svn: 343022
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index f56ade6..e96ba98 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -19,6 +19,7 @@
 #include "RuntimeDyldMachO.h"
 #include "llvm/Object/COFF.h"
 #include "llvm/Object/ELFObjectFile.h"
+#include "llvm/Support/MSVCErrorWorkarounds.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/MutexGuard.h"
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
index 79a1bbb..775a539 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
@@ -14,6 +14,7 @@
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
 #include "llvm/MC/MCInst.h"
+#include "llvm/Support/MSVCErrorWorkarounds.h"
 #include "llvm/Support/Path.h"
 #include <cctype>
 #include <future>
@@ -732,8 +733,14 @@
 
 Expected<JITSymbolResolver::LookupResult> RuntimeDyldCheckerImpl::lookup(
     const JITSymbolResolver::LookupSet &Symbols) const {
-  auto ResultP = std::make_shared<
-      std::promise<Expected<JITSymbolResolver::LookupResult>>>();
+
+#ifdef _MSC_VER
+  using ExpectedLookupResult = MSVCPExpected<JITSymbolResolver::LooupResult>;
+#else
+  using ExpectedLookupResult = Expected<JITSymbolResolver::LookupResult>;
+#endif
+
+  auto ResultP = std::make_shared<std::promise<ExpectedLookupResult>>();
   auto ResultF = ResultP->get_future();
 
   getRTDyld().Resolver.lookup(