aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp4
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;