aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-07 18:29:53 +0000
committerDevang Patel <dpatel@apple.com>2011-03-07 18:29:53 +0000
commite65982c8c88c1a591ca87083f5cb572c0da8b042 (patch)
tree4133feb394b61a52892b3ba468b2b97bd58ef0ca /clang/lib/CodeGen/CodeGenModule.h
parentcd526fa15ee81c25b6d67ed929f2a0b7b5a3ebba (diff)
downloadllvm-e65982c8c88c1a591ca87083f5cb572c0da8b042.zip
llvm-e65982c8c88c1a591ca87083f5cb572c0da8b042.tar.gz
llvm-e65982c8c88c1a591ca87083f5cb572c0da8b042.tar.bz2
Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user experience.
21 int main() { 22 A a; For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr. This fixes ostream-defined.exp regression from gdb testsuite. llvm-svn: 127164
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 4a1575a..550a4dc 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -152,6 +152,7 @@ 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
@@ -281,7 +282,14 @@ public:
StaticLocalDeclMap[D] = GV;
}
- CGDebugInfo *getDebugInfo() { return DebugInfo; }
+ CGDebugInfo *getDebugInfo() {
+ if (DisableDebugInfo)
+ return NULL;
+ return DebugInfo;
+ }
+ void disableDebugInfo() { DisableDebugInfo = true; }
+ void enableDebugInfo() { DisableDebugInfo = false; }
+
ASTContext &getContext() const { return Context; }
const CodeGenOptions &getCodeGenOpts() const { return CodeGenOpts; }
const LangOptions &getLangOptions() const { return Features; }