Minimal changes for LLVM to compile under VS11.

llvm-svn: 151849
This commit is contained in:
Michael J. Spencer 2012-03-01 22:42:52 +00:00
parent d5c3027473
commit 35145f830a
3 changed files with 9 additions and 1 deletions

View File

@ -136,6 +136,10 @@ endif()
if( MSVC )
include(ChooseMSVCCRT)
if( MSVC11 )
add_llvm_definitions(-D_VARIADIC_MAX=10)
endif()
# Add definitions that make MSVC much less annoying.
add_llvm_definitions(
# For some reason MS wants to deprecate a bunch of standard functions...

View File

@ -530,7 +530,7 @@ unsigned DwarfDebug::GetOrCreateSourceID(StringRef FileName,
std::map<std::pair<std::string, std::string>, unsigned>::iterator I;
bool NewlyInserted;
tie(I, NewlyInserted) = SourceIdMap.insert(Entry);
llvm::tie(I, NewlyInserted) = SourceIdMap.insert(Entry);
if (!NewlyInserted)
return I->second;

View File

@ -36,6 +36,10 @@
#define GET_SUBTARGETINFO_MC_DESC
#include "X86GenSubtargetInfo.inc"
#if _MSC_VER
#include <intrin.h>
#endif
using namespace llvm;