if (!PLoc.isInvalid())
Line = PLoc.getLine();
else
- Unit = llvm::DIFile();
+ // If variable location is invalid, use current location to find
+ // corresponding file info.
+ Unit = getOrCreateFile(CurLoc);
CharUnits offset = CGF->BlockDecls[VD];
llvm::SmallVector<llvm::Value *, 9> addr;
--- /dev/null
+// RUN: %clang_cc1 -g %s -fblocks -S -o /dev/null
+// Radar 7959934
+
+@interface NSObject {
+ struct objc_object *isa;
+}
+@end
+@interface Foo : NSObject {
+ int _prop;
+}
+@end
+
+@implementation Foo
+- (int)doSomething {
+ int (^blk)(void) = ^{ return _prop; };
+ return blk();
+}
+
+@end
+