summaryrefslogtreecommitdiff
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2018-12-08 05:06:53 +0000
committerTom Stellard <tstellar@redhat.com>2018-12-08 05:06:53 +0000
commitd0d8eb2e5415b8be29343e3c17a18e49e67b5551 (patch)
treeddc8e6d4ff73b681dfa77d9aea12d124ea3c6db8 /clang/lib/AST/ASTContext.cpp
parent0a9b9e6746d87a4dc929be9622c0f559cb2c119b (diff)
downloadllvmorg-7.0.1-rc3.tar.gz
------------------------------------------------------------------------ r345839 | erichkeane | 2018-11-01 08:11:43 -0700 (Thu, 01 Nov 2018) | 6 lines Multiversioning- Ensure all MV functions are emitted. Multiverson function versions are always used (by the resolver), so ensure that they are always emitted. Change-Id: I5d2e0841fddf0d18918b3fb92ae76814add7ee96 ------------------------------------------------------------------------ llvm-svn: 348686
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index c085f52cae31..648fa9f0fbc6 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -9734,6 +9734,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
return true;
if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
+ // Multiversioned functions always have to be emitted, because they are used
+ // by the resolver.
+ if (FD->isMultiVersion())
+ return true;
// Forward declarations aren't required.
if (!FD->doesThisDeclarationHaveABody())
return FD->doesDeclarationForceExternallyVisibleDefinition();