Skip to content

Commit 43f0b69

Browse files
authored
[AMDGPU] Removal of language sensitive option for _Float16 and half('e') handling (#170443)
Removing the 'e' handling for the amdgcn builtins as we decided to use _Float16 for both HIP/C++ and OpenCL
1 parent bd9651b commit 43f0b69

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

clang/include/clang/Basic/Builtins.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
// SJ -> sigjmp_buf
4444
// K -> ucontext_t
4545
// p -> pid_t
46-
// e -> _Float16 for HIP/C++ and __fp16 for OpenCL
4746
// . -> "...". This may only occur at the end of the function list.
4847
//
4948
// Types may be prefixed with the following modifiers:

clang/lib/AST/ASTContext.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12417,12 +12417,8 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
1241712417

1241812418
// Read the base type.
1241912419
switch (*Str++) {
12420-
default: llvm_unreachable("Unknown builtin type letter!");
12421-
case 'e':
12422-
assert(HowLong == 0 && !Signed && !Unsigned &&
12423-
"Bad modifiers used with 'e'!");
12424-
Type = Context.getLangOpts().OpenCL ? Context.HalfTy : Context.Float16Ty;
12425-
break;
12420+
default:
12421+
llvm_unreachable("Unknown builtin type letter!");
1242612422
case 'x':
1242712423
assert(HowLong == 0 && !Signed && !Unsigned &&
1242812424
"Bad modifiers used with 'x'!");

0 commit comments

Comments
 (0)