From 37bd2ecb11f19a892bc4c7e59135106edca4341a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 18 Dec 2007 08:16:44 +0000 Subject: local static vars are globals also. This fixes a testcase reported by Seo. llvm-svn: 45156 --- clang/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/CodeGen/CGExpr.cpp') diff --git a/clang/CodeGen/CGExpr.cpp b/clang/CodeGen/CGExpr.cpp index 8d136bc0b42..c20680bc4ea 100644 --- a/clang/CodeGen/CGExpr.cpp +++ b/clang/CodeGen/CGExpr.cpp @@ -273,7 +273,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { } else if (const FunctionDecl *FD = dyn_cast(D)) { return LValue::MakeAddr(CGM.GetAddrOfFunctionDecl(FD, false)); } else if (const FileVarDecl *FVD = dyn_cast(D)) { - return LValue::MakeAddr(CGM.GetAddrOfFileVarDecl(FVD, false)); + return LValue::MakeAddr(CGM.GetAddrOfGlobalVar(FVD, false)); } assert(0 && "Unimp declref"); //an invalid LValue, but the assert will -- cgit v1.2.3