================ @@ -0,0 +1,121 @@ +//===--- BuiltinsBase.td - common structured used by builtins ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Attributes +// ========== + +class Attribute<string mangling> { + string Mangling = mangling; +} + +class IndexedAttribute<string baseMangling, int I> : Attribute<baseMangling> { + int Index = I; +} + +// Standard Attributes +// ------------------- +def NoReturn : Attribute<"r">; + +// Attributes from the gnu:: namespace +// ----------------------------------- +def Const : Attribute<"c">; +def NoThrow : Attribute<"n">; +def Pure : Attribute<"U">; +def ReturnsTwice : Attribute<"j">; +// FIXME: gcc has nonnull + +// builtin-specific attributes +// --------------------------- + +// signature is meaningless, use custom typechecking +def CustomTypeChecking : Attribute<"t">; + +// type is not important to semantic analysis and codegen; recognize as builtin +// even if type doesn't match signature, and don't warn if we can't be sure the +// type is right ---------------- AaronBallman wrote:
```suggestion // even if type doesn't match signature, and don't warn if we can't be sure the // type is right. ``` https://github.com/llvm/llvm-project/pull/68324 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits