Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50848 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index e048d59..8a3069e 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -43,7 +43,8 @@
namespace CodeGen {
class CodeGenFunction;
-
+ class CGDebugInfo;
+
/// CodeGenModule - This class organizes the cross-module state that is used
/// while generating LLVM code.
class CodeGenModule {
@@ -54,6 +55,7 @@
Diagnostic &Diags;
CodeGenTypes Types;
CGObjCRuntime *Runtime;
+ CGDebugInfo *DebugInfo;
llvm::Function *MemCpyFn;
llvm::Function *MemSetFn;
@@ -70,10 +72,12 @@
std::vector<llvm::Function *> BuiltinFunctions;
public:
CodeGenModule(ASTContext &C, const LangOptions &Features, llvm::Module &M,
- const llvm::TargetData &TD, Diagnostic &Diags);
+ const llvm::TargetData &TD, Diagnostic &Diags,
+ bool GenerateDebugInfo);
~CodeGenModule();
CGObjCRuntime *getObjCRuntime() { return Runtime; }
+ CGDebugInfo *getDebugInfo() { return DebugInfo; }
ASTContext &getContext() const { return Context; }
const LangOptions &getLangOptions() const { return Features; }
llvm::Module &getModule() const { return TheModule; }