r313162 - Attempt to fix MSVC build.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 13 10:45:51 PDT 2017


Author: alexfh
Date: Wed Sep 13 10:45:51 2017
New Revision: 313162

URL: http://llvm.org/viewvc/llvm-project?rev=313162&view=rev
Log:
Attempt to fix MSVC build.

Modified:
    cfe/trunk/lib/Driver/Job.cpp

Modified: cfe/trunk/lib/Driver/Job.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Job.cpp?rev=313162&r1=313161&r2=313162&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Job.cpp (original)
+++ cfe/trunk/lib/Driver/Job.cpp Wed Sep 13 10:45:51 2017
@@ -14,6 +14,7 @@
 #include "clang/Driver/Tool.h"
 #include "clang/Driver/ToolChain.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/Optional.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringRef.h"
@@ -307,7 +308,7 @@ void Command::setEnvironment(llvm::Array
   Environment.push_back(nullptr);
 }
 
-int Command::Execute(ArrayRef<Optional<StringRef>> Redirects,
+int Command::Execute(ArrayRef<llvm::Optional<StringRef>> Redirects,
                      std::string *ErrMsg, bool *ExecutionFailed) const {
   SmallVector<const char*, 128> Argv;
 
@@ -378,7 +379,7 @@ static bool ShouldFallback(int ExitCode)
   return ExitCode != 0;
 }
 
-int FallbackCommand::Execute(ArrayRef<Optional<StringRef>> Redirects,
+int FallbackCommand::Execute(ArrayRef<llvm::Optional<StringRef>> Redirects,
                              std::string *ErrMsg, bool *ExecutionFailed) const {
   int PrimaryStatus = Command::Execute(Redirects, ErrMsg, ExecutionFailed);
   if (!ShouldFallback(PrimaryStatus))
@@ -410,7 +411,7 @@ void ForceSuccessCommand::Print(raw_ostr
   OS << " || (exit 0)" << Terminator;
 }
 
-int ForceSuccessCommand::Execute(ArrayRef<Optional<StringRef>> Redirects,
+int ForceSuccessCommand::Execute(ArrayRef<llvm::Optional<StringRef>> Redirects,
                                  std::string *ErrMsg,
                                  bool *ExecutionFailed) const {
   int Status = Command::Execute(Redirects, ErrMsg, ExecutionFailed);




More information about the cfe-commits mailing list