summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-03-09 01:51:51 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-03-09 01:51:51 +0000
commit9d35581907a79971f45ff6e6f7f8a5a3836e5cae (patch)
tree04d014a02fa060d5e94d19969894542b9b40935f /clang/lib/CodeGen
parent8aff411addbd5255c2859c3e59c9aea23e9c1dfb (diff)
downloadbcm5719-llvm-9d35581907a79971f45ff6e6f7f8a5a3836e5cae.tar.gz
bcm5719-llvm-9d35581907a79971f45ff6e6f7f8a5a3836e5cae.zip
[AST] Reduce Decl::getASTContext() calls.
- This function is not at all free; pass it around along some hot paths instead of recomputing it deep inside various VarDecl methods. llvm-svn: 152363
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 8ed36aac5f1..9da493448aa 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -217,7 +217,7 @@ public:
VarDecl *VD = dyn_cast<VarDecl>(E->getDecl());
if (!VD && !isa<EnumConstantDecl>(E->getDecl()))
return EmitLoadOfLValue(E);
- if (VD && !VD->isUsableInConstantExpressions())
+ if (VD && !VD->isUsableInConstantExpressions(CGF.getContext()))
return EmitLoadOfLValue(E);
// This is an enumerator or a variable which is usable in constant
OpenPOWER on IntegriCloud