diff options
| author | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-08-30 08:53:09 +0000 |
|---|---|---|
| committer | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-08-30 08:53:09 +0000 |
| commit | 3b8e0b7f96164e8c49d2a833da26edd960f5da1f (patch) | |
| tree | ed8b1ed4d3fef3b621526debda20a64c469b4c12 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 66ea35d9f3d93cab3ca6d735c8eb19a5f701b86f (diff) | |
| download | clang-3b8e0b7f96164e8c49d2a833da26edd960f5da1f.tar.gz clang-3b8e0b7f96164e8c49d2a833da26edd960f5da1f.tar.bz2 clang-3b8e0b7f96164e8c49d2a833da26edd960f5da1f.tar.xz | |
Revert r189649 because it was breaking sanitizer bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index c0357238d2..20352f9f68 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -1376,27 +1376,12 @@ llvm::Value* CodeGenFunction::EmitVAListRef(const Expr* E) { return EmitLValue(E).getAddress(); } -void CodeGenFunction::EmitValueDeclDbgValue(const ValueDecl *Val, - llvm::Constant *Init) { +void CodeGenFunction::EmitDeclRefExprDbgValue(const DeclRefExpr *E, + llvm::Constant *Init) { assert (Init && "Invalid DeclRefExpr initializer!"); - CGDebugInfo *Dbg = getDebugInfo(); - if (!Dbg || - CGM.getCodeGenOpts().getDebugInfo() < CodeGenOptions::LimitedDebugInfo) - return; - - // Make sure we emit a debug reference to the global variable. - if (const VarDecl *VD = dyn_cast<VarDecl>(Val)) { - // Do not duplicate DIE entry for local variables; they are not deferred - // like global variables are. - if (VD->isFileVarDecl() && !getLangOpts().EmitAllDecls && - !getContext().DeclMustBeEmitted(Val)) - Dbg->EmitGlobalVariable(Init, VD); - - // Make sure we emit a debug reference to an enumerator constant. - } else { - assert(isa<EnumConstantDecl>(Val)); - Dbg->EmitEnumConstant(dyn_cast<EnumConstantDecl>(Val)); - } + if (CGDebugInfo *Dbg = getDebugInfo()) + if (CGM.getCodeGenOpts().getDebugInfo() >= CodeGenOptions::LimitedDebugInfo) + Dbg->EmitGlobalVariable(E->getDecl(), Init); } CodeGenFunction::PeepholeProtection |
