summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-11 18:17:16 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-11 18:17:16 +0000
commit6a047c979f4245644b0c6159eb9b14a896dc13e6 (patch)
tree33eb85e8ad8d1396cf3491b72293b785ded65f86
parent88070ec400c9ab5a17d67a6faf35d6919c505f90 (diff)
downloadbcm5719-llvm-6a047c979f4245644b0c6159eb9b14a896dc13e6.tar.gz
bcm5719-llvm-6a047c979f4245644b0c6159eb9b14a896dc13e6.zip
It's bad form to create VarDecl's without DeclContexts
llvm-svn: 103484
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 8082b33fd66..f157f2f406e 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -813,7 +813,9 @@ CharUnits BlockFunction::getBlockOffset(const BlockDeclRefExpr *BDRE) {
llvm::APInt(32,
Pad.getQuantity()),
ArrayType::Normal, 0);
- ValueDecl *PadDecl = VarDecl::Create(getContext(), 0, SourceLocation(),
+ ValueDecl *PadDecl = VarDecl::Create(getContext(),
+ getContext().getTranslationUnitDecl(),
+ SourceLocation(),
0, QualType(PadTy), 0,
VarDecl::None, VarDecl::None);
Expr *E;
OpenPOWER on IntegriCloud