From 4ac7c0bb39696e92fd220118fedc484c09a69870 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 29 Jul 2010 20:08:05 +0000 Subject: [PATCH] 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 --- include/clang/AST/ASTContext.h | 2 +- lib/AST/ASTContext.cpp | 2 +- lib/CodeGen/CodeGenModule.cpp | 2 +- lib/Frontend/PCHWriterDecl.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 3744473228..3c94970016 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -1348,7 +1348,7 @@ public: /// /// \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 633538f312..ef1138eee7 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -5543,7 +5543,7 @@ GVALinkage ASTContext::GetGVALinkageForVariable(const VarDecl *VD) { return GVA_StrongExternal; } -bool ASTContext::DeclIsRequiredFunctionOrFileScopedVar(const Decl *D) { +bool ASTContext::DeclMustBeEmitted(const Decl *D) { if (const VarDecl *VD = dyn_cast(D)) { if (!VD->isFileVarDecl()) return false; diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 06c6f5da21..63d79132b1 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -587,7 +587,7 @@ bool CodeGenModule::MayDeferGeneration(const ValueDecl *Global) { 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 5d66c218bb..28a82cd23f 100644 --- a/lib/Frontend/PCHWriterDecl.cpp +++ b/lib/Frontend/PCHWriterDecl.cpp @@ -1086,7 +1086,7 @@ static bool isRequiredDecl(const Decl *D, ASTContext &Context) { if (isa(D)) return true; - return Context.DeclIsRequiredFunctionOrFileScopedVar(D); + return Context.DeclMustBeEmitted(D); } void PCHWriter::WriteDecl(ASTContext &Context, Decl *D) { -- 2.40.0