From af14603ca61757cf4361b583b45639a04c57e651 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 30 Oct 2010 11:50:40 +0000 Subject: Better solution: calculate the visibility of functions and variables independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 683f175737..681ab0a008 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -259,12 +259,13 @@ public: /// setGlobalVisibility - Set the visibility for the given LLVM /// GlobalValue. - void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D) const; + void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D, + bool IsForDefinition) const; /// setTypeVisibility - Set the visibility for the given global /// value which holds information about a type. void setTypeVisibility(llvm::GlobalValue *GV, const CXXRecordDecl *D, - bool IsForRTTI) const; + bool IsForRTTI, bool IsForDefinition) const; llvm::Constant *GetAddrOfGlobal(GlobalDecl GD) { if (isa(GD.getDecl())) -- cgit v1.2.3