From dd5132ce2569a1ef901c92772eb8581aa1705f25 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Sat, 6 Mar 2010 09:23:02 +0000 Subject: Update clang to r97873. --- lib/CodeGen/CGExprConstant.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprConstant.cpp') diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 3df552d75bb6d..f0d82a8f0dc6d 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -761,7 +761,9 @@ public: return C; } case Expr::DeclRefExprClass: { - NamedDecl *Decl = cast(E)->getDecl(); + ValueDecl *Decl = cast(E)->getDecl(); + if (Decl->hasAttr()) + return CGM.GetWeakRefReference(Decl); if (const FunctionDecl *FD = dyn_cast(Decl)) return CGM.GetAddrOfFunction(FD); if (const VarDecl* VD = dyn_cast(Decl)) { -- cgit v1.3