[llvm] [Analysis] Move TargetLibraryInfo data to TableGen (PR #165009)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 25 03:59:25 PDT 2025


================
@@ -0,0 +1,1599 @@
+//===-- TargetLibraryInfo.td - File that describes library functions ------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+include "llvm/Analysis/TargetLibraryInfoImpl.td"
+
+/// void *operator new(unsigned int);
+def msvc_new_int : TargetLibCall< "??2 at YAPAXI@Z", [Ptr, Int]>;
+
+/// void *operator new(unsigned int, const std::nothrow_t&);
+def msvc_new_int_nothrow : TargetLibCall< "??2 at YAPAXIABUnothrow_t@std@@@Z", [Ptr, Int, Ptr]>;
----------------
arsenm wrote:

Can you reflow this to avoid breaking the type list across lines? Also note that I'd consider clang-format's tablegen handling to be wrong 95% of the time 

https://github.com/llvm/llvm-project/pull/165009


More information about the llvm-commits mailing list