diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index fa9676a1f32d..e38dee92db29 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1007,9 +1007,9 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, // On ELF, if -fno-semantic-interposition is specified and the target // supports local aliases, there will be neither CC1 // -fsemantic-interposition nor -fhalf-no-semantic-interposition. Set - // dso_local if using a local alias is preferable (can avoid GOT - // indirection). - if (!GV->canBenefitFromLocalAlias()) + // dso_local on the function if using a local alias is preferable (can avoid + // PLT indirection). + if (!(isa<llvm::Function>(GV) && GV->canBenefitFromLocalAlias())) return false; return !(CGM.getLangOpts().SemanticInterposition || CGM.getLangOpts().HalfNoSemanticInterposition); |
