I just filed a patch for this issue, see https://go-review.googlesource.com/c/gollvm/+/384394
在2022年2月9日星期三 UTC+8 14:57:08<james.h...@gmail.com> 写道: > I tried to build gollvm with the latest llvm, but it failed with several > compilation errors, such as the one below. Using llvm-13.0.0 resulted in > compilation errors too. Did anyone get into similar errors? > > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp: > In function ‘llvm::AttributeList legalizeCallAttributes(llvm::LLVMContext&, > llvm::AttributeList)’: > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1286:38: > > error: conversion from ‘llvm::AttributeSet’ to non-scalar type > ‘llvm::AttrBuilder’ requested > 1286 | AttrBuilder FnAttrs = AL.getFnAttrs(); > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1292:22: > > error: cannot convert ‘llvm::Attribute’ to ‘const llvm::AttributeMask&’ > 1292 | FnAttrs.remove(A); > | ^ > | | > | llvm::Attribute > In file included from > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Argument.h:18, > from > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Function.h:25, > from > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/PassManager.h:45, > from > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.h:20, > from > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:15: > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Attributes.h:1041:44: > note: initializing argument 1 of ‘llvm::AttrBuilder& > llvm::AttrBuilder::remove(const llvm::AttributeMask&)’ > 1041 | AttrBuilder &remove(const AttributeMask &AM); > | ~~~~~~~~~~~~~~~~~~~~~^~ > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e8fe8444-f303-426c-992a-f347e5b106a1n%40googlegroups.com.