[llvm] 044cc91 - Delete setjmp_undefined_for_msvc workaround after llvm.setjmp was removed

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 27 18:09:44 PST 2019


Author: Fangrui Song
Date: 2019-12-27T18:09:22-08:00
New Revision: 044cc919f4bcc5e101b88589cc07463b20a38b4e

URL: https://github.com/llvm/llvm-project/commit/044cc919f4bcc5e101b88589cc07463b20a38b4e
DIFF: https://github.com/llvm/llvm-project/commit/044cc919f4bcc5e101b88589cc07463b20a38b4e.diff

LOG: Delete setjmp_undefined_for_msvc workaround after llvm.setjmp was removed

Added: 
    

Modified: 
    llvm/lib/CodeGen/IntrinsicLowering.cpp
    llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
index 5f78b9ec92d5..4461a235d6c1 100644
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp
@@ -50,14 +50,6 @@ static CallInst *ReplaceCallWith(const char *NewFn, CallInst *CI,
   return NewCI;
 }
 
-// VisualStudio defines setjmp as _setjmp
-#if defined(_MSC_VER) && defined(setjmp) && \
-                         !defined(setjmp_undefined_for_msvc)
-#  pragma push_macro("setjmp")
-#  undef setjmp
-#  define setjmp_undefined_for_msvc
-#endif
-
 /// Emit the code to lower bswap of V before the specified instruction IP.
 static Value *LowerBSWAP(LLVMContext &Context, Value *V, Instruction *IP) {
   assert(V->getType()->isIntOrIntVectorTy() && "Can't bswap a non-integer type!");

diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 93eccf60a38a..95b1e1bebe98 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -5690,14 +5690,6 @@ SDDbgValue *SelectionDAGBuilder::getDbgValue(SDValue N,
                          /*IsIndirect*/ false, dl, DbgSDNodeOrder);
 }
 
-// VisualStudio defines setjmp as _setjmp
-#if defined(_MSC_VER) && defined(setjmp) && \
-                         !defined(setjmp_undefined_for_msvc)
-#  pragma push_macro("setjmp")
-#  undef setjmp
-#  define setjmp_undefined_for_msvc
-#endif
-
 static unsigned FixedPointIntrinsicToOpcode(unsigned Intrinsic) {
   switch (Intrinsic) {
   case Intrinsic::smul_fix:


        


More information about the llvm-commits mailing list