summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-02-07 19:04:41 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-02-07 19:04:41 +0000
commitdeb10becf39672dd72d3a4c0143db2838ec1ccb2 (patch)
treebe1bc0f17bafb463b82b0113c95cf8280b8e53a4 /clang/lib/CodeGen/CGDecl.cpp
parent123c749ee9973c20bbcb9ecfe6f9b0860b55bc51 (diff)
downloadbcm5719-llvm-deb10becf39672dd72d3a4c0143db2838ec1ccb2.tar.gz
bcm5719-llvm-deb10becf39672dd72d3a4c0143db2838ec1ccb2.zip
Don't pass ForDefinition_t in places it is redundant.
I found this while looking at the ppc failures caused by the dso_local change. The issue was that the patch would produce the wrong answer for available_externally. Having ForDefinition_t available in places where the code can just check the linkage is a bit of a foot gun. This patch removes the ForDefiniton_t argument in places where the linkage is already know. llvm-svn: 324499
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index d2168ce1b0b..e3e4098e7cc 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -240,7 +240,7 @@ llvm::Constant *CodeGenModule::getOrCreateStaticVarDecl(
getModule(), LTy, Ty.isConstant(getContext()), Linkage, Init, Name,
nullptr, llvm::GlobalVariable::NotThreadLocal, TargetAS);
GV->setAlignment(getContext().getDeclAlign(&D).getQuantity());
- setGlobalVisibility(GV, &D, ForDefinition);
+ setGlobalVisibility(GV, &D);
if (supportsCOMDAT() && GV->isWeakForLinker())
GV->setComdat(TheModule.getOrInsertComdat(GV->getName()));
OpenPOWER on IntegriCloud