summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-25 21:26:13 +0000
committerDevang Patel <dpatel@apple.com>2011-03-25 21:26:13 +0000
commit5f070a51e7d7d814e0abe145dc0258ddea27df45 (patch)
treecd92a9428b033874b8fb0009e829db1334c83af1 /clang/lib
parente5afbd422f11327d34dbf39548603fd72c597efb (diff)
downloadbcm5719-llvm-5f070a51e7d7d814e0abe145dc0258ddea27df45.tar.gz
bcm5719-llvm-5f070a51e7d7d814e0abe145dc0258ddea27df45.zip
Provide blockDecl's startLoc to startFunction. This fixes hidden bug exposed by recent code gen changes. This is tested by global-blocks-lines.exp in gdb testsuite.
llvm-svn: 128303
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 8351d36f255..20350c8e6ab 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -914,7 +914,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
// Begin generating the function.
StartFunction(blockDecl, fnType->getResultType(), fn, fnInfo, args,
- blockInfo.getBlockExpr()->getBody()->getLocEnd());
+ blockInfo.getBlockExpr()->getBody()->getLocStart());
CurFuncDecl = outerFnDecl; // StartFunction sets this to blockDecl
// Okay. Undo some of what StartFunction did.
OpenPOWER on IntegriCloud