浏览代码

[msvc] Add necessary #include to make compiler intrinsics available.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369944 91177308-0d34-0410-b5e6-96231b3b80d8
Richard Smith 6 年之前
父节点
当前提交
d47013537d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      lib/Basic/Stack.cpp

+ 4 - 0
lib/Basic/Stack.cpp

@@ -15,6 +15,10 @@
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/Support/CrashRecoveryContext.h"
 #include "llvm/Support/CrashRecoveryContext.h"
 
 
+#ifdef _MSC_VER
+#include <intrin.h>  // for _AddressOfReturnAddress
+#endif
+
 static LLVM_THREAD_LOCAL void *BottomOfStack = nullptr;
 static LLVM_THREAD_LOCAL void *BottomOfStack = nullptr;
 
 
 static void *getStackPointer() {
 static void *getStackPointer() {