forked from OSchip/llvm-project
[OPENMP] Fix debug info for 'atomic' construct.
Debug info for statement under 'atomic' construct must point exactly to that statement, not the directive itself. llvm-svn: 255487
This commit is contained in:
parent
870d1bcdf9
commit
33c56402d8
clang
|
@ -2514,7 +2514,8 @@ void CodeGenFunction::EmitOMPAtomicDirective(const OMPAtomicDirective &S) {
|
|||
}
|
||||
|
||||
LexicalScope Scope(*this, S.getSourceRange());
|
||||
auto &&CodeGen = [&S, Kind, IsSeqCst](CodeGenFunction &CGF) {
|
||||
auto &&CodeGen = [&S, Kind, IsSeqCst, CS](CodeGenFunction &CGF) {
|
||||
CGF.EmitStopPoint(CS);
|
||||
EmitOMPAtomicExpr(CGF, Kind, IsSeqCst, S.isPostfixUpdate(), S.getX(),
|
||||
S.getV(), S.getExpr(), S.getUpdateExpr(),
|
||||
S.isXLHSInRHSPart(), S.getLocStart());
|
||||
|
|
|
@ -112,7 +112,7 @@ void parallel_atomic() {
|
|||
// TERM_DEBUG: call void @__clang_call_terminate
|
||||
// TERM_DEBUG: unreachable
|
||||
}
|
||||
// TERM_DEBUG-DAG: [[READ_LOC]] = !DILocation(line: [[@LINE-33]],
|
||||
// TERM_DEBUG-DAG: [[WRITE_LOC]] = !DILocation(line: [[@LINE-28]],
|
||||
// TERM_DEBUG-DAG: [[UPDATE_LOC]] = !DILocation(line: [[@LINE-22]],
|
||||
// TERM_DEBUG-DAG: [[CAPTURE_LOC]] = !DILocation(line: [[@LINE-16]],
|
||||
// TERM_DEBUG-DAG: [[READ_LOC]] = !DILocation(line: [[@LINE-28]],
|
||||
// TERM_DEBUG-DAG: [[WRITE_LOC]] = !DILocation(line: [[@LINE-22]],
|
||||
// TERM_DEBUG-DAG: [[UPDATE_LOC]] = !DILocation(line: [[@LINE-16]],
|
||||
// TERM_DEBUG-DAG: [[CAPTURE_LOC]] = !DILocation(line: [[@LINE-9]],
|
||||
|
|
Loading…
Reference in New Issue