[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 11:27:47 PDT 2020
jhuber6 added inline comments.
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3209-3214
+ else if ((T.isArch64Bit() && TT.isArch32Bit()) ||
+ (T.isArch64Bit() && TT.isArch16Bit()) ||
+ (T.isArch32Bit() && TT.isArch64Bit()) ||
+ (T.isArch32Bit() && TT.isArch16Bit()) ||
+ (T.isArch16Bit() && TT.isArch32Bit()) ||
+ (T.isArch16Bit() && TT.isArch64Bit()))
----------------
ABataev wrote:
> Maybe do something like `Triple::getArchPointerBitWidth(T.getArch()) != Triple::getArchPointerBitWidth(TT.getArch())"?
That was my first thought but that function is private to the Triple class so I just went with this brute force method. The file has this comment for the justification.
```
/// Test whether the architecture is 64-bit
///
/// Note that this tests for 64-bit pointer width, and nothing else. Note
/// that we intentionally expose only three predicates, 64-bit, 32-bit, and
/// 16-bit. The inner details of pointer width for particular architectures
/// is not summed up in the triple, and so only a coarse grained predicate
/// system is provided.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88594/new/
https://reviews.llvm.org/D88594
More information about the llvm-commits
mailing list