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/CodeGenModule.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 550a4dcc8b..a9855fba51 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -152,7 +152,6 @@ class CodeGenModule : public CodeGenTypeCache { CGObjCRuntime* Runtime; CGDebugInfo* DebugInfo; - bool DisableDebugInfo; // WeakRefReferences - A set of references that have only been seen via // a weakref so far. This is used to remove the weak of the reference if we ever @@ -282,13 +281,7 @@ public: StaticLocalDeclMap[D] = GV; } - CGDebugInfo *getDebugInfo() { - if (DisableDebugInfo) - return NULL; - return DebugInfo; - } - void disableDebugInfo() { DisableDebugInfo = true; } - void enableDebugInfo() { DisableDebugInfo = false; } + CGDebugInfo *getModuleDebugInfo() { return DebugInfo; } ASTContext &getContext() const { return Context; } const CodeGenOptions &getCodeGenOpts() const { return CodeGenOpts; } -- cgit v1.2.3-18-g5258