[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 21 02:20:25 PDT 2025
================
@@ -2860,9 +2861,25 @@ static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND) {
GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
}
+static bool HasExistingGeneralizedTypeMD(llvm::Function *F) {
+ llvm::MDNode *MD = F->getMetadata(llvm::LLVMContext::MD_type);
+ if (!MD || !isa<llvm::MDString>(MD->getOperand(1)))
+ return false;
----------------
arsenm wrote:
The type of the metadata should be verifier enforced and not require checking here. However, in the context of clang I'm not sure why you need to read this here
https://github.com/llvm/llvm-project/pull/117036
More information about the llvm-branch-commits
mailing list