teak-llvm/clang/utils/TableGen
Simon Tatham 98ea4b30c2 [ARM,MVE] Make the MVE intrinsics work in C++!
Summary:
Apparently nobody has tried this in months of development. It turns
out that `FunctionDecl::getBuiltinID` will never consider a function
to be a builtin if it is in C++ and not extern "C". So none of the
function declarations in <arm_mve.h> are recognized as builtins when
clang is compiling in C++ mode: it just emits calls to them as
ordinary functions, which then turn out not to exist at link time.

The trivial fix is to wrap most of arm_mve.h in an extern "C".

Added a test in clang/test/CodeGen/arm-mve-intrinsics which checks
basic functioning of the MVE header file in C++ mode. I've filled it
with copies of existing test functions from other files in that
directory, including a few moderately tricky cases of overloading (in
particular one that relies on the strict-polymorphism attribute added
in D72518).

(I considered making //every// test in that directory compile in both
C and C++ mode and check the code generation was identical. But I
think that would increase testing time by more than the value it adds,
and also update_cc_test_checks gets confused when the output function
name varies between RUN lines.)

Reviewers: LukeGeeson, MarkMurrayARM, miyuki, dmgreen

Reviewed By: MarkMurrayARM

Subscribers: kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73268
2020-01-23 14:10:27 +00:00
..
ASTTableGen.cpp Add the ability to use property-based serialization for "cased" types. 2019-12-16 13:33:59 -05:00
ASTTableGen.h Add the ability for properties to be conditional on other properties. 2019-12-16 13:34:00 -05:00
ClangASTNodesEmitter.cpp Add the ability to use property-based serialization for "cased" types. 2019-12-16 13:33:59 -05:00
ClangASTPropertiesEmitter.cpp Forward {read,write}SomeEnumType to {read,write}Enum instead of 2019-12-16 13:34:00 -05:00
ClangAttrEmitter.cpp Standardize the reader methods in ASTReader; NFC. 2019-12-14 00:16:48 -05:00
ClangCommentCommandInfoEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangCommentHTMLNamedCharacterReferenceEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangCommentHTMLTagsEmitter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangDataCollectorsEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangDiagnosticsEmitter.cpp Fix uninitialized variable warnings. NFCI. 2019-11-02 18:03:21 +00:00
ClangOpcodesEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangOpenCLBuiltinEmitter.cpp [clang][OpenCL] Fix covered switch warning 2020-01-14 16:21:42 +00:00
ClangOptionDocEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangSACheckersEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangTypeNodesEmitter.cpp Enable better node-hierarchy metaprogramming; NFC. 2019-12-14 00:16:47 -05:00
CMakeLists.txt Abstract serialization: TableGen "basic" reader/writer CRTP 2019-12-14 00:16:48 -05:00
MveEmitter.cpp [ARM,MVE] Make the MVE intrinsics work in C++! 2020-01-23 14:10:27 +00:00
NeonEmitter.cpp Recommit ARM-NEON: make type modifiers orthogonal and allow multiple modifiers. 2019-11-26 09:21:47 +00:00
TableGen.cpp Abstract serialization: TableGen the (de)serialization code for Types. 2019-12-14 00:17:01 -05:00
TableGenBackends.h Abstract serialization: TableGen "basic" reader/writer CRTP 2019-12-14 00:16:48 -05:00