diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 9 | ||||
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 30 | ||||
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.h | 6 |
3 files changed, 0 insertions, 45 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index eae5f02edbd..951e9aeec27 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -859,11 +859,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, return RValue::get(Builder.CreateZExt(Result, Int64Ty, "extend.zext")); } case Builtin::BI__builtin_setjmp: { - if (!getTargetHooks().hasSjLjLowering(*this)) { - CGM.ErrorUnsupported(E, "__builtin_setjmp"); - return RValue::get(nullptr); - } - // Buffer is a void**. Value *Buf = EmitScalarExpr(E->getArg(0)); @@ -886,10 +881,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, return RValue::get(Builder.CreateCall(F, Buf)); } case Builtin::BI__builtin_longjmp: { - if (!getTargetHooks().hasSjLjLowering(*this)) { - CGM.ErrorUnsupported(E, "__builtin_longjmp"); - return RValue::get(nullptr); - } Value *Buf = EmitScalarExpr(E->getArg(0)); Buf = Builder.CreateBitCast(Buf, Int8PtrTy); diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 7b25da256e1..988b8fc80d2 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -664,10 +664,6 @@ public: ('T' << 24); return llvm::ConstantInt::get(CGM.Int32Ty, Sig); } - - bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const override { - return true; - } }; } @@ -1613,10 +1609,6 @@ public: unsigned getOpenMPSimdDefaultAlignment(QualType) const override { return HasAVX ? 32 : 16; } - - bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const override { - return true; - } }; class PS4TargetCodeGenInfo : public X86_64TargetCodeGenInfo { @@ -1724,10 +1716,6 @@ public: unsigned getOpenMPSimdDefaultAlignment(QualType) const override { return HasAVX ? 32 : 16; } - - bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const override { - return true; - } }; void WinX86_64TargetCodeGenInfo::SetTargetAttributes(const Decl *D, @@ -3127,10 +3115,6 @@ public: unsigned getOpenMPSimdDefaultAlignment(QualType) const override { return 16; // Natural alignment for Altivec vectors. } - - bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const override { - return true; - } }; } @@ -3381,10 +3365,6 @@ public: return 16; // Natural alignment for Altivec and VSX vectors. } - - bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const override { - return true; - } }; class PPC64TargetCodeGenInfo : public DefaultTargetCodeGenInfo { @@ -3402,10 +3382,6 @@ public: unsigned getOpenMPSimdDefaultAlignment(QualType) const override { return 16; // Natural alignment for Altivec vectors. } - - bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const override { - return true; - } }; } @@ -4533,12 +4509,6 @@ public: llvm::AttributeSet::FunctionIndex, B)); } - - bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const override { - return false; - // FIXME: backend implementation too restricted, even on Darwin. - // return CGF.getTarget().getTriple().isOSDarwin(); - } }; class WindowsARMTargetCodeGenInfo : public ARMTargetCodeGenInfo { diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h index 0c3fdc3c8ac..cc469d69e39 100644 --- a/clang/lib/CodeGen/TargetInfo.h +++ b/clang/lib/CodeGen/TargetInfo.h @@ -225,12 +225,6 @@ public: virtual unsigned getOpenMPSimdDefaultAlignment(QualType Type) const { return 0; } - - /// Control if __builtin_longjmp / __builtin_setjmp can be lowered to - /// llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp. - virtual bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const { - return false; - } }; } |