================
@@ -858,12 +865,28 @@ const CGFunctionInfo 
&CodeGenTypes::arrangeLLVMFunctionInfo(
   // Construct the function info.  We co-allocate the ArgInfos.
   FI = CGFunctionInfo::create(CC, isInstanceMethod, isChainCall, 
isDelegateCall,
                               info, paramInfos, resultType, argTypes, 
required);
+
+  llvm::BumpPtrAllocator Alloc;
+  llvm::abi::TypeBuilder TB(Alloc);
+
+  QualTypeMapper Mapper(CGM.getContext(), Alloc);
+
+  SmallVector<const llvm::abi::Type *, 8> MappedArgTypes;
+  for (CanQualType ArgType : argTypes) {
+    MappedArgTypes.push_back(Mapper.convertType(ArgType));
+  }
+  ArrayRef<const llvm::abi::Type *> ABIArgTypes = MappedArgTypes;
+  tempFI = llvm::abi::ABIFunctionInfo::create(
+      CC, Mapper.convertType(resultType), ABIArgTypes);
   FunctionInfos.InsertNode(FI, insertPos);
 
   bool inserted = FunctionsBeingProcessed.insert(FI).second;
   (void)inserted;
   assert(inserted && "Recursively being processed?");
 
+  bool isBPF = CGM.getTriple().getArch() == llvm::Triple::bpfeb ||
+               CGM.getTriple().getArch() == llvm::Triple::bpfel;
----------------
nikic wrote:

You can use `getTripe().isBPF()`.

https://github.com/llvm/llvm-project/pull/140112
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to