summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2012-03-01 22:42:52 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2012-03-01 22:42:52 +0000
commit647c0ce48cdbefc22c221ffeb892e73ccd155009 (patch)
treea17719a7cc76ff67b5d7782f3da6cc4956977061
parentb2930b92d3e9734ced6679844666799648ebbd7a (diff)
downloadllvm-647c0ce48cdbefc22c221ffeb892e73ccd155009.tar.gz
llvm-647c0ce48cdbefc22c221ffeb892e73ccd155009.tar.bz2
llvm-647c0ce48cdbefc22c221ffeb892e73ccd155009.tar.xz
Minimal changes for LLVM to compile under VS11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151849 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake4
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp4
3 files changed, 9 insertions, 1 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
index 0a5c02f5ba..3a10a861d6 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/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/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 920f82d01d..58e40e17c5 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/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/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
index 5ca592d5ea..38c3401c73 100644
--- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
+++ b/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;