diff options
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index cfc94430bdf..1a3089a14b2 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2577,9 +2577,12 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, if (HasDecl) DeclCache.insert(std::make_pair(D->getCanonicalDecl(), llvm::WeakVH(SP))); - // Push function on region stack. + // Push the function onto the lexical block stack. llvm::MDNode *SPN = SP; LexicalBlockStack.push_back(SPN); + // Initialize PrevLoc to the location of the function header. + PrevLoc = Loc; + if (HasDecl) RegionMap[D] = llvm::WeakVH(SP); } |

