From aa11289f754d220c9c155b68a4f84cdcfcefef6a 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127165 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index add163da1d..e23d6107c0 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/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