diff options
| -rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 4 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp | 4 | 
3 files changed, 9 insertions, 1 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 0a5c02f5ba5..3a10a861d67 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -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... diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 920f82d01db..58e40e17c52 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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; diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp index 5ca592d5ead..38c3401c73c 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp @@ -36,6 +36,10 @@  #define GET_SUBTARGETINFO_MC_DESC  #include "X86GenSubtargetInfo.inc" +#if _MSC_VER +#include <intrin.h> +#endif +  using namespace llvm;  | 

