[PATCH] D103343: [SystemZ][z/OS] Stricter condition for HLASM class instantiation

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 31 07:55:09 PDT 2021


uweigand added a comment.

In D103343#2789521 <https://reviews.llvm.org/D103343#2789521>, @anirudhp wrote:

> In D103343#2789121 <https://reviews.llvm.org/D103343#2789121>, @uweigand wrote:
>
>> Maybe it would be clearer to be explicit and write:
>>
>>   if (C.getTargetTriple().isSystemZ() && C.getTargetTriple().isOSzOS())
>>
>> This should have the same effect
>
> Yes, that would be the same behaviour.
>
>> but avoid the implicit assumptions.
>
> Are we making an implicit assumption? In the `getDefaultFormat` function in Triple.cpp, we have:
>
>   case Triple::systemz:
>     if (T.isOSzOS())
>       return Triple::GOFF;
>
> `GOFF` is only set when the arch is systemz and the os is zos.

That's true now.  The "implicit assumption" is that this will never change in the future.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103343



More information about the llvm-commits mailing list