diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-10-12 20:12:19 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-10-12 20:12:19 +0000 |
commit | 46aafc16e8b6d5ab9700780a9b03568bef31f708 (patch) | |
tree | 16cf1053edb66682cb2ea29fb8fea9d3ec34c6bf /llvm/lib/LTO/LTOCodeGenerator.cpp | |
parent | 2f159a265a36cabc5a088bde50ac87bebaadcf8e (diff) | |
download | bcm5719-llvm-46aafc16e8b6d5ab9700780a9b03568bef31f708.tar.gz bcm5719-llvm-46aafc16e8b6d5ab9700780a9b03568bef31f708.zip |
LTO: Use the correct mangler function in LTOCodeGenerator::applyScopeRestrictions().
We need to use the overload of Mangler::getNameWithPrefix that takes a
GlobalValue in order to mangle in the stdcall stack byte count for Windows
targets.
Differential Revision: https://reviews.llvm.org/D25529
llvm-svn: 284040
Diffstat (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOCodeGenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index 81fb58a4e0a..a07707cd38a 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -410,6 +410,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { // Declare a callback for the internalize pass that will ask for every // candidate GlobalValue if it can be internalized or not. + Mangler Mang; SmallString<64> MangledName; auto mustPreserveGV = [&](const GlobalValue &GV) -> bool { // Unnamed globals can't be mangled, but they can't be preserved either. @@ -421,8 +422,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { // underscore. MangledName.clear(); MangledName.reserve(GV.getName().size() + 1); - Mangler::getNameWithPrefix(MangledName, GV.getName(), - MergedModule->getDataLayout()); + Mang.getNameWithPrefix(MangledName, &GV, /*CannotUsePrivateLabel=*/false); return MustPreserveSymbols.count(MangledName); }; |