[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 14 08:16:58 PDT 2025
================
@@ -0,0 +1,102 @@
+//===- BPF.cpp ------------------------------------------------------------===//
+//
+// 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/ABI/ABIInfo.h"
+#include "llvm/ABI/Types.h"
+#include "llvm/Support/Alignment.h"
+#include "llvm/Support/Casting.h"
+
+namespace llvm::abi {
+
+class BPFABIInfo : public ABIInfo {
+private:
+ TypeBuilder &TB;
+
+ bool isAggregateType(const Type *Ty) const {
+ return Ty->isStruct() || Ty->isUnion() || Ty->isArray() ||
+ (Ty->isVector() && !isSimpleVector(dyn_cast<VectorType>(Ty)));
----------------
vortex73 wrote:
Actually it is unnecessary since this logic is taken care of in the classifyArgumentType function - I'll remove it :+1:
https://github.com/llvm/llvm-project/pull/140112
More information about the llvm-commits
mailing list