1 Commits

Author SHA1 Message Date
David Pagan
52315f9b75
[clang][OpenMP] Fix target data if/logical expression assert fail (#70268)
Fixed assertion failure

  Basic Block in function 'main' does not have terminator!
  label %land.end

caused by premature setting of CodeGenIP upon entry to
emitTargetDataCalls, where subsequent evaluation of logical expression
created new basic blocks, leaving CodeGenIP pointing to the wrong basic
block. CodeGenIP is now set near the end of the function, just prior to
generating a comparison of the logical expression result (from the if
clause) which uses CodeGenIP to insert new IR.
2023-10-26 13:19:37 -07:00