diff options
author | Petr Hosek <phosek@chromium.org> | 2017-11-22 17:59:30 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-11-22 17:59:30 +0000 |
commit | 9696dbb988973488de9905b323d903ac7e3c2d28 (patch) | |
tree | e2c85e35a41a982397e76f35e741abd3334e4a7d /clang/lib/CodeGen/CGVTables.cpp | |
parent | de56343cf0bd8190c4e1818a97a234be4919938c (diff) | |
download | bcm5719-llvm-9696dbb988973488de9905b323d903ac7e3c2d28.tar.gz bcm5719-llvm-9696dbb988973488de9905b323d903ac7e3c2d28.zip |
[CodeGen] Fix vtable not receiving hidden visibility when using push(visibility)
This change should resolve https://bugs.llvm.org/show_bug.cgi?id=35022
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D39627
llvm-svn: 318853
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 67388ee208d..2d9bf3bce92 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -51,7 +51,7 @@ llvm::Constant *CodeGenModule::GetAddrOfThunk(GlobalDecl GD, static void setThunkVisibility(CodeGenModule &CGM, const CXXMethodDecl *MD, const ThunkInfo &Thunk, llvm::Function *Fn) { - CGM.setGlobalVisibility(Fn, MD); + CGM.setGlobalVisibility(Fn, MD, ForDefinition); } static void setThunkProperties(CodeGenModule &CGM, const ThunkInfo &Thunk, @@ -730,7 +730,7 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD, // Create the variable that will hold the construction vtable. llvm::GlobalVariable *VTable = CGM.CreateOrReplaceCXXRuntimeVariable(Name, VTType, Linkage); - CGM.setGlobalVisibility(VTable, RD); + CGM.setGlobalVisibility(VTable, RD, ForDefinition); // V-tables are always unnamed_addr. VTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); |