diff options
author | Devang Patel <dpatel@apple.com> | 2011-03-07 18:45:56 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-03-07 18:45:56 +0000 |
commit | aa11289f754d220c9c155b68a4f84cdcfcefef6a (patch) | |
tree | 289e73302fe26d25b23e9159c5e8776800d050ed /lib/CodeGen/CGExprScalar.cpp | |
parent | 5de7a0e8800b89780e565c1013e566414f11546a (diff) |
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
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 911a0ea418..c442f10b86 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -2568,11 +2568,11 @@ Value *CodeGenFunction::EmitScalarExpr(const Expr *E, bool IgnoreResultAssign) { "Invalid scalar expression to emit"); if (isa<CXXDefaultArgExpr>(E)) - CGM.disableDebugInfo(); + disableDebugInfo(); Value *V = ScalarExprEmitter(*this, IgnoreResultAssign) .Visit(const_cast<Expr*>(E)); if (isa<CXXDefaultArgExpr>(E)) - CGM.enableDebugInfo(); + enableDebugInfo(); return V; } |