summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-18 08:16:44 +0000
committerChris Lattner <sabre@nondot.org>2007-12-18 08:16:44 +0000
commit37bd2ecb11f19a892bc4c7e59135106edca4341a (patch)
tree059f925968aede841c8e31ad8c60ea4d716db1f8 /clang/CodeGen/CGExpr.cpp
parentd4fc27e9370c0f272e9800092e57936a67f22604 (diff)
downloadbcm5719-llvm-37bd2ecb11f19a892bc4c7e59135106edca4341a.tar.gz
bcm5719-llvm-37bd2ecb11f19a892bc4c7e59135106edca4341a.zip
local static vars are globals also. This fixes a testcase
reported by Seo. llvm-svn: 45156
Diffstat (limited to 'clang/CodeGen/CGExpr.cpp')
-rw-r--r--clang/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
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<FunctionDecl>(D)) {
return LValue::MakeAddr(CGM.GetAddrOfFunctionDecl(FD, false));
} else if (const FileVarDecl *FVD = dyn_cast<FileVarDecl>(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
OpenPOWER on IntegriCloud