Change the name to something less terrible; suggestion by Doug. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109797 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 3744473..3c94970 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -1348,7 +1348,7 @@
///
/// \returns true if the function/var must be CodeGen'ed/deserialized even if
/// it is not used.
- bool DeclIsRequiredFunctionOrFileScopedVar(const Decl *D);
+ bool DeclMustBeEmitted(const Decl *D);
//===--------------------------------------------------------------------===//
// Statistics
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 633538f..ef1138e 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -5543,7 +5543,7 @@
return GVA_StrongExternal;
}
-bool ASTContext::DeclIsRequiredFunctionOrFileScopedVar(const Decl *D) {
+bool ASTContext::DeclMustBeEmitted(const Decl *D) {
if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
if (!VD->isFileVarDecl())
return false;
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 06c6f5d..63d7913 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -587,7 +587,7 @@
if (Features.EmitAllDecls)
return false;
- return !getContext().DeclIsRequiredFunctionOrFileScopedVar(Global);
+ return !getContext().DeclMustBeEmitted(Global);
}
llvm::Constant *CodeGenModule::GetWeakRefReference(const ValueDecl *VD) {
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index 5d66c21..28a82cd 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -1086,7 +1086,7 @@
if (isa<FileScopeAsmDecl>(D))
return true;
- return Context.DeclIsRequiredFunctionOrFileScopedVar(D);
+ return Context.DeclMustBeEmitted(D);
}
void PCHWriter::WriteDecl(ASTContext &Context, Decl *D) {