Index: lib/CodeGen/CodeGenFunction.cpp =================================================================== --- lib/CodeGen/CodeGenFunction.cpp +++ lib/CodeGen/CodeGenFunction.cpp @@ -1179,8 +1179,8 @@ { ApplyDebugLocation DL(*this, Cond); CondV = EvaluateExprAsBool(Cond); + Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights); } - Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights); } /// ErrorUnsupported - Print out an error that codegen doesn't support the Index: test/CodeGenCXX/debug-info-line.cpp =================================================================== --- test/CodeGenCXX/debug-info-line.cpp +++ test/CodeGenCXX/debug-info-line.cpp @@ -216,7 +216,7 @@ // CHECK-LABEL: define void f18(int a, int b) { // CHECK: icmp {{.*}}, !dbg [[DBG_F18_1:![0-9]*]] -// CHECK: br {{.*}}, !dbg [[DBG_F18_2:![0-9]*]] +// CHECK: br {{.*}}, !dbg [[DBG_F18_1]] #line 2000 if (a // && // @@ -227,7 +227,7 @@ // CHECK-LABEL: define void f19(int a, int b) { // CHECK: icmp {{.*}}, !dbg [[DBG_F19_1:![0-9]*]] -// CHECK: br {{.*}}, !dbg [[DBG_F19_2:![0-9]*]] +// CHECK: br {{.*}}, !dbg [[DBG_F19_1]] #line 2100 if (a // || // @@ -316,9 +316,7 @@ // CHECK: [[DBG_F16]] = !MDLocation(line: 1800, // CHECK: [[DBG_F17]] = !MDLocation(line: 1900, // CHECK: [[DBG_F18_1]] = !MDLocation(line: 2000, -// CHECK: [[DBG_F18_2]] = !MDLocation(line: 2001, // CHECK: [[DBG_F19_1]] = !MDLocation(line: 2100, -// CHECK: [[DBG_F19_2]] = !MDLocation(line: 2101, // CHECK: [[DBG_F20_1]] = !MDLocation(line: 2200, // CHECK: [[DBG_F23]] = !MDLocation(line: 2500, // CHECK: [[DBG_F24]] = !MDLocation(line: 2600,