Author: dim
Date: Sat Feb 14 23:25:39 2015
New Revision: 278788
URL: https://svnweb.freebsd.org/changeset/base/278788

Log:
  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

Modified:
  stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp

Changes in other areas also in this revision:
Modified:
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp

Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp
==============================================================================
--- stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp      
Sat Feb 14 22:12:17 2015        (r278787)
+++ stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp      
Sat Feb 14 23:25:39 2015        (r278788)
@@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDec
   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();
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to