[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)
Jonathan Thackray via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 21 02:00:59 PDT 2025
================
@@ -0,0 +1,105 @@
+//===------ CGBuiltin.h - Emit LLVM Code for builtins ---------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LIB_CODEGEN_CGBUILTIN_H
+#define LLVM_CLANG_LIB_CODEGEN_CGBUILTIN_H
+
+#include "CodeGenFunction.h"
+
+// Many of MSVC builtins are on x64, ARM and AArch64; to avoid repeating code,
+// we handle them here.
+enum class clang::CodeGen::CodeGenFunction::MSVCIntrin {
----------------
jthackray wrote:
Sorry, this isn't practical. Doing this means also renaming these functions to `namespace clang::CodeGen` in `CGBuiltin.cpp` too, and then rename all calls to them. So the ripple effect causes a really large diff.
My aim for this change was to split CGBuiltin.cpp, with the fewest possible changes to the code. You're welcome to try your suggested change after I've merged this PR.
https://github.com/llvm/llvm-project/pull/132252
More information about the cfe-commits
mailing list