Debug Info: Fix an oversight of r186553. Ensure that the function prologue
of an artificial function gets an artificial location as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187074 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index ec4af58..f200ec9 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -1313,9 +1313,10 @@
SC_Static,
false,
false);
- StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
- // Don't emit any line table entries for the body of this function.
+ // Create a scope with an artificial location for the body of this function.
ArtificialLocation AL(*this, Builder);
+ StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
+ AL.Emit();
llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
@@ -1488,9 +1489,10 @@
SourceLocation(), II, C.VoidTy, 0,
SC_Static,
false, false);
- StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
- // Don't emit any line table entries for the body of this function.
+ // Create a scope with an artificial location for the body of this function.
ArtificialLocation AL(*this, Builder);
+ StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
+ AL.Emit();
llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();