jdoerfert added a comment.
Still unsure if we should also error out for NVPTX but that is a different
story. Looks OK from my side, assuming you address the earlier comment.
Maybe someone else should accept though.
Comment at: clang/lib/Sema/Sema.cpp:241
+
jyu2 added inline comments.
Comment at: clang/lib/Sema/Sema.cpp:241
+ (Context.getAuxTargetInfo() &&
+ Context.getAuxTargetInfo()->hasInt128Type())) {
// If either of the 128-bit integer types are unavailable to name lookup,
jyu2 wrote:
>
jyu2 added inline comments.
Comment at: clang/lib/Sema/Sema.cpp:241
+ (Context.getAuxTargetInfo() &&
+ Context.getAuxTargetInfo()->hasInt128Type())) {
// If either of the 128-bit integer types are unavailable to name lookup,
jdoerfert wrote:
>
jdoerfert added a comment.
So, NVPTX seems to do something sensible with i128, though I haven't done
rigorous testing.
Comment at: clang/lib/Sema/Sema.cpp:241
+ (Context.getAuxTargetInfo() &&
+ Context.getAuxTargetInfo()->hasInt128Type())) {
// If either of
jyu2 added inline comments.
Comment at: clang/lib/Basic/Targets/SPIR.h:108
+
+ virtual bool hasInt128Type() const { return false; }
};
jdoerfert wrote:
> Not virtual but override.
Thank you. I will change that.
Comment at:
jdoerfert requested changes to this revision.
jdoerfert added inline comments.
This revision now requires changes to proceed.
Comment at: clang/lib/Basic/Targets/SPIR.h:108
+
+ virtual bool hasInt128Type() const { return false; }
};
Not virtual but override.
jyu2 created this revision.
jyu2 added reviewers: erichkeane, aaron.ballman, Fznamznon, rjmccall,
jdoerfert, rsmith.
jyu2 added a project: clang.
Herald added a subscriber: Anastasia.
jyu2 requested review of this revision.
Emit error for use of 128-bit integer inside device code had been