From d6ffebb077db73705565a71e86d54c044cbcb9dd Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Mon, 7 Mar 2011 18:45:56 +0000 Subject: DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. llvm-svn: 127165 --- clang/lib/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExpr.cpp') diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index add163da1d2e..e23d6107c0be 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1937,7 +1937,7 @@ LValue CodeGenFunction::EmitOpaqueValueLValue(const OpaqueValueExpr *e) { RValue CodeGenFunction::EmitCallExpr(const CallExpr *E, ReturnValueSlot ReturnValue) { - if (CGDebugInfo *DI = CGM.getDebugInfo()) { + if (CGDebugInfo *DI = getDebugInfo()) { DI->setLocation(E->getLocStart()); DI->UpdateLineDirectiveRegion(Builder); DI->EmitStopPoint(Builder); -- cgit v1.2.3