diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-11 18:17:16 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-11 18:17:16 +0000 |
commit | 6a047c979f4245644b0c6159eb9b14a896dc13e6 (patch) | |
tree | 33eb85e8ad8d1396cf3491b72293b785ded65f86 | |
parent | 88070ec400c9ab5a17d67a6faf35d6919c505f90 (diff) | |
download | bcm5719-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.cpp | 4 |
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; |