================
@@ -6812,7 +6811,7 @@ void CodeGenFunction::EmitOMPOrderedBlockAssocDirective(
assert(S.getBeginLoc().isValid() &&
"Outlined function call location must be valid.");
ApplyDebugLocation::CreateDefaultArtificial(*this, S.getBeginLoc());
- OMPBuilderCBHelpers::EmitCaptureStmt(*this, CodeGenIP, *FiniBB,
+ OMPBuilderCBHelpers::EmitCaptureStmt(*this, CodeGenBB->end(), *FiniBB,
----------------
nikic wrote:
splitBBWithSuffix() moves the instruction that CodeGenIP points to to a
different block, but EmitCaptureStmt() is supposed to operate on the original
block. It previously worked because the block and the iterator in CodeGenIP
could go out of sync.
I've changed EmitCaptureStmt to only accept a BasicBlock instead of iterator,
because that's the only thing it actually used. The use of `end()` here was
basically arbitrary.
https://github.com/llvm/llvm-project/pull/228117
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits