From 067ff9f57f6543f8b3fdf75f8ebfe6a7b180133e Mon Sep 17 00:00:00 2001 From: triton Date: Fri, 9 Aug 2013 01:55:12 +0100 Subject: [PATCH] Respect the ToolSetToUse options and assign a default to MSCVersion if none is requested since it is needed to make Clang define _MSC_VER. --- src/Parser/Parser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index c138448e..161a02b8 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -184,6 +184,11 @@ void Parser::SetupHeader() /*IgnoreSysRoot=*/false); } + if (Opts->MicrosoftMode) + { + LangOpts.MSCVersion = Opts->ToolSetToUse; + if (!LangOpts.MSCVersion) LangOpts.MSCVersion = 1700; + } #endif // Enable preprocessing record.