[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

Florian Mayer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 14:23:32 PDT 2023


fmayer added a comment.

In D149162#4404271 <https://reviews.llvm.org/D149162#4404271>, @agozillon wrote:

> I have hopefully fixed the sanitizer issue (the incorrect assert, thank you again for the catch) with the following patch: https://github.com/llvm/llvm-project/commit/309023263dba3b02bc885101faa47d110f662f99 it was a slightly more involved change than I expected, I had to rework the getTargetEntryUniqueInfo function to use a callback function to support Clang's use of a fallback filename and line number (gathered from a PresumedLoc). So I apologies for the extended time to land the change.

Thanks! I saw you use `llvm_unreachable` for error handling. Is that actually unreachable by construction of the program? Otherwise the compiler is free to assume this is never reached and will trigger undefined behaviour if it is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149162/new/

https://reviews.llvm.org/D149162



More information about the cfe-commits mailing list