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 | 0ebf1bb150b36128098a9f269d708361c4feebfa (patch) | |
tree | 66e16fdc2b917abcb5861f90294e0b2eb9c349ab /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 58934986f220dec8b75a76c2de03db029b65f336 (diff) | |
download | bcm5719-llvm-0ebf1bb150b36128098a9f269d708361c4feebfa.tar.gz bcm5719-llvm-0ebf1bb150b36128098a9f269d708361c4feebfa.zip |
Revert r189649 because it was breaking sanitizer bots.
llvm-svn: 189660
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index c0357238d21..20352f9f685 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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 |