|
25 | 25 | #include "clang/AST/Decl.h" |
26 | 26 | #include "clang/AST/DeclCXX.h" |
27 | 27 | #include "clang/AST/DeclObjC.h" |
28 | | -#include "clang/AST/Type.h" |
29 | 28 | #include "clang/Basic/CodeGenOptions.h" |
30 | 29 | #include "clang/Basic/TargetInfo.h" |
31 | 30 | #include "clang/CodeGen/CGFunctionInfo.h" |
@@ -5078,11 +5077,6 @@ static unsigned getMaxVectorWidth(const llvm::Type *Ty) { |
5078 | 5077 | return MaxVectorWidth; |
5079 | 5078 | } |
5080 | 5079 |
|
5081 | | -static bool isCXXDeclType(const FunctionDecl *FD) { |
5082 | | - return isa<CXXConstructorDecl>(FD) || isa<CXXMethodDecl>(FD) || |
5083 | | - isa<CXXDestructorDecl>(FD); |
5084 | | -} |
5085 | | - |
5086 | 5080 | RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, |
5087 | 5081 | const CGCallee &Callee, |
5088 | 5082 | ReturnValueSlot ReturnValue, |
@@ -5771,38 +5765,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, |
5771 | 5765 | AllocAlignAttrEmitter AllocAlignAttrEmitter(*this, TargetDecl, CallArgs); |
5772 | 5766 | Attrs = AllocAlignAttrEmitter.TryEmitAsCallSiteAttribute(Attrs); |
5773 | 5767 |
|
5774 | | - if (CGM.getCodeGenOpts().CallGraphSection) { |
5775 | | - // Create operand bundle only for indirect calls, not for all |
5776 | | - if (callOrInvoke && *callOrInvoke && (*callOrInvoke)->isIndirectCall()) { |
5777 | | - |
5778 | | - assert((TargetDecl && TargetDecl->getFunctionType() || |
5779 | | - Callee.getAbstractInfo().getCalleeFunctionProtoType()) && |
5780 | | - "cannot find callsite type"); |
5781 | | - |
5782 | | - QualType CST; |
5783 | | - if (TargetDecl && TargetDecl->getFunctionType()) |
5784 | | - CST = QualType(TargetDecl->getFunctionType(), 0); |
5785 | | - else if (const auto *FPT = |
5786 | | - Callee.getAbstractInfo().getCalleeFunctionProtoType()) |
5787 | | - CST = QualType(FPT, 0); |
5788 | | - |
5789 | | - if (!CST.isNull()) { |
5790 | | - auto *TypeIdMD = CGM.CreateMetadataIdentifierGeneralized(CST); |
5791 | | - auto *TypeIdMDVal = |
5792 | | - llvm::MetadataAsValue::get(getLLVMContext(), TypeIdMD); |
5793 | | - BundleList.emplace_back("type", TypeIdMDVal); |
5794 | | - } |
5795 | | - |
5796 | | - // Set type identifier metadata of indirect calls for call graph section. |
5797 | | - if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(TargetDecl)) { |
5798 | | - // Type id metadata is set only for C/C++ contexts. |
5799 | | - if (isCXXDeclType(FD)) { |
5800 | | - CGM.CreateFunctionTypeMetadataForIcall(FD->getType(), *callOrInvoke); |
5801 | | - } |
5802 | | - } |
5803 | | - } |
5804 | | - } |
5805 | | - |
5806 | 5768 | // Emit the actual call/invoke instruction. |
5807 | 5769 | llvm::CallBase *CI; |
5808 | 5770 | if (!InvokeDest) { |
|
0 commit comments