[PATCH] D135595: [HLSL] Add utility to convert environment to stage

Chris Bieneman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 10 09:33:56 PDT 2022


beanz added a comment.

In D135595#3847056 <https://reviews.llvm.org/D135595#3847056>, @python3kgae wrote:

> Backend needs the same thing.
> Is it possible to move this to llvm and share it between frontend and backend?

This translates the triple to a clang-defined enum... so strictly speaking no, that isn't possible.

Can you elaborate on the context where the backend needs this? I suspect in the backend we need a similar but not quite the same utility. Specifically, I think we need to translate the environment value to an unsigned integer. For all cases where an enum makes sense we should be using the Environment value in the backend.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135595



More information about the cfe-commits mailing list