From 303facbeb8d9fabbc84eb7eb526f4bd2a070e585 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 31 Jan 2015 01:10:11 +0000 Subject: DebugInfo: Fix line table for comparisons harder/better for the sake of C (& the GDB buildbot) llvm-svn: 227663 --- clang/lib/CodeGen/CodeGenFunction.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index ae78aa0..e152bfd 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -1190,7 +1190,11 @@ void CodeGenFunction::EmitBranchOnBoolExpr(const Expr *Cond, CurrentCount - TrueCount); // Emit the code with the fully general case. - llvm::Value *CondV = EvaluateExprAsBool(Cond); + llvm::Value *CondV; + { + ApplyDebugLocation DL(*this, Cond); + CondV = EvaluateExprAsBool(Cond); + } Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights); } -- cgit v1.1