aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index f992aa72e2..f883bec4ff 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -1286,15 +1286,8 @@ llvm::Value *CodeGenFunction::getEHCleanupDestSlot() {
}
void CodeGenFunction::EmitDeclRefExprDbgValue(const DeclRefExpr *E,
- const APValue &AV) {
- CGDebugInfo *Dbg = getDebugInfo();
- if (!Dbg) return;
-
- llvm::Constant *C = NULL;
- if (AV.isInt())
- C = llvm::ConstantInt::get(getLLVMContext(), AV.getInt());
- else if (AV.isFloat())
- C = llvm::ConstantFP::get(getLLVMContext(), AV.getFloat());
- if (C)
- Dbg->EmitGlobalVariable(C, E->getDecl(), Builder);
+ llvm::ConstantInt *Init) {
+ assert (Init && "Invalid DeclRefExpr initializer!");
+ if (CGDebugInfo *Dbg = getDebugInfo())
+ Dbg->EmitGlobalVariable(E->getDecl(), Init, Builder);
}