From ea84f59f5c1694de6ea62669c14c143c6bf52b94 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 14 Jan 2010 18:06:13 +0000 Subject: [PATCH] Add comment. llvm-svn: 93434 --- clang/lib/CodeGen/CGDebugInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index bad5fbb9808c..6cfe503d3c87 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1014,6 +1014,9 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, LinkageName = Name; } + // It is expected that CurLoc is set before using EmitFunctionStart. + // Usually, CurLoc points to the left bracket location of compound + // statement representing function body. llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc); SourceManager &SM = CGM.getContext().getSourceManager(); unsigned LineNo = SM.getPresumedLoc(CurLoc).getLine();