From: Devang Patel Date: Thu, 14 Jan 2010 00:48:09 +0000 (+0000) Subject: Because CurLoc is the current source location as far as CGDebugInfo is concerned... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bca10069a9d5243da33cfc9a471ea239bb49e1b8;p=clang Because CurLoc is the current source location as far as CGDebugInfo is concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93389 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 8b03ca92af..bad5fbb980 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1014,7 +1014,6 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, LinkageName = Name; } - // FIXME: Why is this using CurLoc??? llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc); SourceManager &SM = CGM.getContext().getSourceManager(); unsigned LineNo = SM.getPresumedLoc(CurLoc).getLine();