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 | ba55ec29033efba015878744dc5e1946a47a795a (patch) | |
tree | 2d507ee4b62e890bd98fe16ad8e104cbde39263b /lib/CodeGen/CGBlocks.cpp | |
parent | 2166beba8d939d2938c5401af2c8d3687afd5d8c (diff) |
It's bad form to create VarDecl's without DeclContexts
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 8082b33fd6..f157f2f406 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/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; |