[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

Sergei Barannikov via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 20 16:04:22 PDT 2025


================
@@ -0,0 +1,102 @@
+//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* ------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LIB_CODEGEN_CGBUILTIN_H
+#define LLVM_CLANG_LIB_CODEGEN_CGBUILTIN_H
+
+#include "CodeGenFunction.h"
+
+using namespace clang;
+using namespace CodeGen;
+using namespace llvm;
+
+// Many of MSVC builtins are on x64, ARM and AArch64; to avoid repeating code,
+// we handle them here.
+enum class CodeGenFunction::MSVCIntrin {
----------------
s-barannikov wrote:

The contents of this file should be in `clang::` namespace (or rather in `clang::CodeGen::`).
This would allow eliminating two `using` directives above.

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


More information about the cfe-commits mailing list