From 6bf806b3e2fddf79fa0326df1da341de9da35d08 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Mon, 12 Apr 2021 09:49:00 +0100 Subject: [AArch64] ACLE: Fix issue for mismatching enum types with builtins. This patch fixes an issue with the SVE prefetch and qinc/qdec intrinsics that take an `enum` argument, but where the builtin prototype encodes these as `int`. Some code in SemaDecl found the mismatch and chose to forget about the builtin altogether, which meant that any future code using that builtin would fail. The code that forgets about the builtin was actually obsolete after D77491 and should have been removed. This patch now removes that code. This patch also fixes another issue with the SVE prefetch intrinsic when built with C++, where the builtin didn't accept the correct pointer type, which should be `const void *`. Reviewed By: tambre Differential Revision: https://reviews.llvm.org/D100046 --- clang/lib/Basic/Builtins.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'clang/lib/Basic/Builtins.cpp') diff --git a/clang/lib/Basic/Builtins.cpp b/clang/lib/Basic/Builtins.cpp index 49afaa9..8a70c7e 100644 --- a/clang/lib/Basic/Builtins.cpp +++ b/clang/lib/Basic/Builtins.cpp @@ -106,10 +106,6 @@ void Builtin::Context::initializeBuiltins(IdentifierTable &Table, .setBuiltinID(i + Builtin::FirstTSBuiltin + TSRecords.size()); } -void Builtin::Context::forgetBuiltin(unsigned ID, IdentifierTable &Table) { - Table.get(getRecord(ID).Name).setBuiltinID(0); -} - unsigned Builtin::Context::getRequiredVectorWidth(unsigned ID) const { const char *WidthPos = ::strchr(getRecord(ID).Attributes, 'V'); if (!WidthPos) -- cgit v1.1