summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-02-14 23:25:39 +0000
committerdim <dim@FreeBSD.org>2015-02-14 23:25:39 +0000
commit74485ef712cdd63cb11490d4b91230105145a5de (patch)
treea500dbc0aaace8ac09aa06e97586e1871c381e67 /contrib
parenta7a8c39e00df26eda21597ddbe0f587ced4375a8 (diff)
downloadFreeBSD-src-74485ef712cdd63cb11490d4b91230105145a5de.zip
FreeBSD-src-74485ef712cdd63cb11490d4b91230105145a5de.tar.gz
Pull in r201130 from upstream clang trunk (by Ted Kremenek):
Fix PCH deserialization bug with local static symbols being treated as local extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes <rdar://problem/15975816> and <rdar://problem/15926311>. This fixes a crash in audio/murmur, which is using both PCH and Boost. Direct commit to stable/10 and stable/9, since head has clang 3.5.1, which already includes this change. Reported by: smh PR: 197389
Diffstat (limited to 'contrib')
-rw-r--r--contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp b/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp
index b8102d8..89f4547 100644
--- a/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::VisitVarDeclImpl(VarDecl *VD) {
VD->setCachedLinkage(VarLinkage);
// Reconstruct the one piece of the IdentifierNamespace that we need.
- if (VarLinkage != NoLinkage &&
+ if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage &&
VD->getLexicalDeclContext()->isFunctionOrMethod())
VD->setLocalExternDecl();
OpenPOWER on IntegriCloud