From: Rafael Espindola Date: Tue, 20 Mar 2018 22:02:57 +0000 (+0000) Subject: Delete BuiltinCC. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d21ab31af7ffa1309f418dc56712bcf46b49cfe;p=clang Delete BuiltinCC. NFC. It is always identical to RuntimeCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328050 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/ABIInfo.h b/lib/CodeGen/ABIInfo.h index fa0461f5d9..feed3833f2 100644 --- a/lib/CodeGen/ABIInfo.h +++ b/lib/CodeGen/ABIInfo.h @@ -53,12 +53,9 @@ namespace swiftcall { CodeGen::CodeGenTypes &CGT; protected: llvm::CallingConv::ID RuntimeCC; - llvm::CallingConv::ID BuiltinCC; public: ABIInfo(CodeGen::CodeGenTypes &cgt) - : CGT(cgt), - RuntimeCC(llvm::CallingConv::C), - BuiltinCC(llvm::CallingConv::C) {} + : CGT(cgt), RuntimeCC(llvm::CallingConv::C) {} virtual ~ABIInfo(); @@ -77,11 +74,6 @@ namespace swiftcall { return RuntimeCC; } - /// Return the calling convention to use for compiler builtins - llvm::CallingConv::ID getBuiltinCC() const { - return BuiltinCC; - } - virtual void computeInfo(CodeGen::CGFunctionInfo &FI) const = 0; /// EmitVAArg - Emit the target dependent code to load a value of diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index ededfbb494..3af2d7f317 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -629,7 +629,7 @@ ComplexPairTy ComplexExprEmitter::EmitComplexBinOpLibCall(StringRef LibCallName, llvm::Instruction *Call; RValue Res = CGF.EmitCall(FuncInfo, Callee, ReturnValueSlot(), Args, &Call); - cast(Call)->setCallingConv(CGF.CGM.getBuiltinCC()); + cast(Call)->setCallingConv(CGF.CGM.getRuntimeCC()); return Res.getComplexVal(); } diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 9558615c7a..53177d2640 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -123,7 +123,6 @@ CodeGenModule::CodeGenModule(ASTContext &C, const HeaderSearchOptions &HSO, ASTAllocaAddressSpace = getTargetCodeGenInfo().getASTAllocaAddressSpace(); RuntimeCC = getTargetCodeGenInfo().getABIInfo().getRuntimeCC(); - BuiltinCC = getTargetCodeGenInfo().getABIInfo().getBuiltinCC(); if (LangOpts.ObjC1) createObjCRuntime(); @@ -2646,7 +2645,7 @@ CodeGenModule::CreateBuiltinFunction(llvm::FunctionType *FTy, StringRef Name, /*DontDefer=*/false, /*IsThunk=*/false, ExtraAttrs); if (auto *F = dyn_cast(C)) if (F->empty()) - F->setCallingConv(getBuiltinCC()); + F->setCallingConv(getRuntimeCC()); return C; } diff --git a/lib/CodeGen/CodeGenTypeCache.h b/lib/CodeGen/CodeGenTypeCache.h index fb096ac899..901aed6c00 100644 --- a/lib/CodeGen/CodeGenTypeCache.h +++ b/lib/CodeGen/CodeGenTypeCache.h @@ -112,8 +112,6 @@ struct CodeGenTypeCache { llvm::CallingConv::ID RuntimeCC; llvm::CallingConv::ID getRuntimeCC() const { return RuntimeCC; } - llvm::CallingConv::ID BuiltinCC; - llvm::CallingConv::ID getBuiltinCC() const { return BuiltinCC; } LangAS getASTAllocaAddressSpace() const { return ASTAllocaAddressSpace; } }; diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 939679e794..01eb6ead16 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -5690,18 +5690,6 @@ void ARMABIInfo::setCCs() { llvm::CallingConv::ID abiCC = getABIDefaultCC(); if (abiCC != getLLVMDefaultCC()) RuntimeCC = abiCC; - - // AAPCS apparently requires runtime support functions to be soft-float, but - // that's almost certainly for historic reasons (Thumb1 not supporting VFP - // most likely). It's more convenient for AAPCS16_VFP to be hard-float. - - // The Run-time ABI for the ARM Architecture section 4.1.2 requires - // AEABI-complying FP helper functions to use the base AAPCS. - // These AEABI functions are expanded in the ARM llvm backend, all the builtin - // support functions emitted by clang such as the _Complex helpers follow the - // abiCC. - if (abiCC != getLLVMDefaultCC()) - BuiltinCC = abiCC; } ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty,