summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/GlobalSplit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalSplit.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalSplit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalSplit.cpp b/llvm/lib/Transforms/IPO/GlobalSplit.cpp
index 4a319ead23c0e..365b269dc3bf6 100644
--- a/llvm/lib/Transforms/IPO/GlobalSplit.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalSplit.cpp
@@ -111,6 +111,9 @@ static bool splitGlobal(GlobalVariable &GV) {
ConstantInt::get(Int32Ty, ByteOffset - SplitBegin)),
Type->getOperand(1)}));
}
+
+ if (GV.hasMetadata(LLVMContext::MD_vcall_visibility))
+ SplitGV->setVCallVisibilityMetadata(GV.getVCallVisibility());
}
for (User *U : GV.users()) {