summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-06-13 21:50:44 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-06-13 21:50:44 +0000
commitd4b6e7a9b736539bf51f171c645a5ed8f66ae679 (patch)
tree1910e49ffbeb68e7a2d49688641ced2850373b8a /clang/lib/CodeGen/CodeGenModule.cpp
parent5f81f48bd4c9e18c341415031209653f0d980932 (diff)
downloadbcm5719-llvm-d4b6e7a9b736539bf51f171c645a5ed8f66ae679.tar.gz
bcm5719-llvm-d4b6e7a9b736539bf51f171c645a5ed8f66ae679.zip
Fix the linkage of static locals inside a CapturedStmt. (Found in the
process of trying to fix the related issue for block literals.) llvm-svn: 183951
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index f6218cddfb5..4865a9174c9 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -510,7 +510,11 @@ void CodeGenModule::EmitCtorList(const CtorList &Fns, const char *GlobalName) {
llvm::GlobalValue::LinkageTypes
CodeGenModule::getFunctionLinkage(GlobalDecl GD) {
- const FunctionDecl *D = cast<FunctionDecl>(GD.getDecl());
+ return getFunctionLinkage(cast<FunctionDecl>(GD.getDecl()));
+}
+
+llvm::GlobalValue::LinkageTypes
+CodeGenModule::getFunctionLinkage(const FunctionDecl *D) {
GVALinkage Linkage = getContext().GetGVALinkageForFunction(D);
if (Linkage == GVA_Internal)
OpenPOWER on IntegriCloud