From 6586c676b42aa9c7e78f9b1d419767a02793a70f Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 19 Dec 2024 12:06:46 +0000 Subject: [FMV][AArch64] Emit mangled default version if explicitly specified. (#120022) Currently we need at least one more version other than the default to trigger FMV. However we would like a header file declaration __attribute__((target_version("default"))) void f(void); to guarantee that there will be f.default --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 5ac3eef..c49f763 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -4283,7 +4283,7 @@ void CodeGenModule::emitMultiVersionFunctions() { getContext().forEachMultiversionedFunctionVersion( FD, [&](const FunctionDecl *CurFD) { llvm::SmallVector Feats; - bool IsDefined = CurFD->doesThisDeclarationHaveABody(); + bool IsDefined = CurFD->getDefinition() != nullptr; if (const auto *TA = CurFD->getAttr()) { assert(getTarget().getTriple().isX86() && "Unsupported target"); -- cgit v1.1