Re: [go-nuts] Re: gollvm compilation issue

2022-02-11 Thread Zhen Huang
Yes, I can build now. Thank you for the fix.


On Wed, Feb 9, 2022 at 4:52 PM Than McIntosh  wrote:

> OK, I checked in another CL to resolve this new issue. Give it a try again
> please and let me know if you are able to build.
>
> Thanks, Than
>
>
> On Wed, Feb 9, 2022 at 2:35 PM Than McIntosh  wrote:
>
>> Thanks for the report. I'll take a look...
>>
>> Than
>>
>> On Wed, Feb 9, 2022 at 2:33 PM Zhen Huang 
>> wrote:
>>
>>> Thank you for the prompt response! I checked out the updated code and
>>> the previous compilation error is gone. However, another compilation error
>>> came up:
>>>
>>> [183/1626] Building CXX object
>>> tools/g...LVMCppGoPasses.dir/GoStatepoints.cpp.o
>>> FAILED:
>>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o
>>> /usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE
>>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>>> -Itools/gollvm/passes
>>> -I/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes -Iinclude
>>> -I/home/user/code/llvm/llvm-project/llvm/include -fPIC
>>> -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time
>>> -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
>>> -Wno-missing-field-initializers -pedantic -Wno-long-long
>>> -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess
>>> -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type
>>> -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
>>> -Wmisleading-indentation -fdiagnostics-color -g-fno-exceptions
>>> -fno-rtti -fcf-protection=none -std=c++14 -MD -MT
>>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -MF
>>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o.d -o
>>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -c
>>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp
>>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:
>>> In function ‘void makeStatepointExplicitImpl(llvm::CallBase*,
>>> llvm::SmallVectorImpl&, llvm::SmallVectorImpl&,
>>> {anonymous}::PartiallyConstructedSafepointRecord&,
>>> std::vector<{anonymous}::DeferredReplacement>&)’:
>>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1433:65:
>>> warning: ‘llvm::Type* llvm::PointerType::getElementType() const’ is
>>> deprecated: Pointer element types are deprecated. You can *temporarily* use
>>> Type::getPointerElementType() instead [-Wdeprecated-declarations]
>>>  1433 |   Type *T =
>>> cast(V->getType())->getElementType();
>>>   | ^
>>> In file included from
>>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Function.h:29,
>>>  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/DerivedTypes.h:675:9:
>>> note: declared here
>>>   675 |   Type *getElementType() const {
>>>   | ^~
>>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1517:27:
>>> error: no matching function for call to
>>> ‘llvm::IRBuilder<>::CreateGCStatepointInvoke(uint64_t&, uint32_t&,
>>> llvm::Value*&, llvm::BasicBlock*, llvm::BasicBlock*,
>>> llvm::ArrayRef&, llvm::ArrayRef&,
>>> llvm::ArrayRef, const char [17])’
>>>  1517 | "statepoint_token");
>>>   |   ^
>>> In file included from
>>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:45:
>>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:809:3:
>>> note: candidate: ‘llvm::InvokeInst*
>>> llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
>>> llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*,
>>> llvm::ArrayRef, llvm::Optional
>>> >, llvm::ArrayRef, const llvm::Twine&)’
>>>   809 |   CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes,
>>>   |   ^~~~
>>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:810:43:
>>> note:   no known conversion for argument 3 from ‘llvm::Value*’ to
>>> ‘llvm::FunctionCallee’
>>>   810 |FunctionCallee ActualInvokee,
>>> BasicBlock *NormalDest,
>>>   |~~~^
>>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15:
>>> note: candidate: ‘llvm::InvokeInst*
>>> llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
>>> llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*, uint32_t,
>>> llvm::ArrayRef, llvm::Optional >,
>>> llvm::Optional >, llvm::ArrayRef,
>>> const llvm::Twine&)’
>>>   817 |   InvokeInst 

Re: [go-nuts] Re: gollvm compilation issue

2022-02-09 Thread 'Than McIntosh' via golang-nuts
OK, I checked in another CL to resolve this new issue. Give it a try again
please and let me know if you are able to build.

Thanks, Than


On Wed, Feb 9, 2022 at 2:35 PM Than McIntosh  wrote:

> Thanks for the report. I'll take a look...
>
> Than
>
> On Wed, Feb 9, 2022 at 2:33 PM Zhen Huang 
> wrote:
>
>> Thank you for the prompt response! I checked out the updated code and the
>> previous compilation error is gone. However, another compilation error came
>> up:
>>
>> [183/1626] Building CXX object
>> tools/g...LVMCppGoPasses.dir/GoStatepoints.cpp.o
>> FAILED:
>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o
>> /usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE
>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>> -Itools/gollvm/passes
>> -I/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes -Iinclude
>> -I/home/user/code/llvm/llvm-project/llvm/include -fPIC
>> -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time
>> -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
>> -Wno-missing-field-initializers -pedantic -Wno-long-long
>> -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess
>> -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type
>> -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
>> -Wmisleading-indentation -fdiagnostics-color -g-fno-exceptions
>> -fno-rtti -fcf-protection=none -std=c++14 -MD -MT
>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -MF
>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o.d -o
>> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -c
>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp
>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:
>> In function ‘void makeStatepointExplicitImpl(llvm::CallBase*,
>> llvm::SmallVectorImpl&, llvm::SmallVectorImpl&,
>> {anonymous}::PartiallyConstructedSafepointRecord&,
>> std::vector<{anonymous}::DeferredReplacement>&)’:
>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1433:65:
>> warning: ‘llvm::Type* llvm::PointerType::getElementType() const’ is
>> deprecated: Pointer element types are deprecated. You can *temporarily* use
>> Type::getPointerElementType() instead [-Wdeprecated-declarations]
>>  1433 |   Type *T = cast(V->getType())->getElementType();
>>   | ^
>> In file included from
>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Function.h:29,
>>  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/DerivedTypes.h:675:9:
>> note: declared here
>>   675 |   Type *getElementType() const {
>>   | ^~
>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1517:27:
>> error: no matching function for call to
>> ‘llvm::IRBuilder<>::CreateGCStatepointInvoke(uint64_t&, uint32_t&,
>> llvm::Value*&, llvm::BasicBlock*, llvm::BasicBlock*,
>> llvm::ArrayRef&, llvm::ArrayRef&,
>> llvm::ArrayRef, const char [17])’
>>  1517 | "statepoint_token");
>>   |   ^
>> In file included from
>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:45:
>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:809:3:
>> note: candidate: ‘llvm::InvokeInst*
>> llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
>> llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*,
>> llvm::ArrayRef, llvm::Optional
>> >, llvm::ArrayRef, const llvm::Twine&)’
>>   809 |   CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes,
>>   |   ^~~~
>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:810:43:
>> note:   no known conversion for argument 3 from ‘llvm::Value*’ to
>> ‘llvm::FunctionCallee’
>>   810 |FunctionCallee ActualInvokee,
>> BasicBlock *NormalDest,
>>   |~~~^
>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15:
>> note: candidate: ‘llvm::InvokeInst*
>> llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
>> llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*, uint32_t,
>> llvm::ArrayRef, llvm::Optional >,
>> llvm::Optional >, llvm::ArrayRef,
>> const llvm::Twine&)’
>>   817 |   InvokeInst *CreateGCStatepointInvoke(
>>   |   ^~~~
>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15:
>> note:   candidate expects 11 arguments, 9 

Re: [go-nuts] Re: gollvm compilation issue

2022-02-09 Thread 'Than McIntosh' via golang-nuts
Thanks for the report. I'll take a look...

Than

On Wed, Feb 9, 2022 at 2:33 PM Zhen Huang  wrote:

> Thank you for the prompt response! I checked out the updated code and the
> previous compilation error is gone. However, another compilation error came
> up:
>
> [183/1626] Building CXX object
> tools/g...LVMCppGoPasses.dir/GoStatepoints.cpp.o
> FAILED:
> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o
> /usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> -Itools/gollvm/passes
> -I/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes -Iinclude
> -I/home/user/code/llvm/llvm-project/llvm/include -fPIC
> -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time
> -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
> -Wno-missing-field-initializers -pedantic -Wno-long-long
> -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess
> -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type
> -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
> -Wmisleading-indentation -fdiagnostics-color -g-fno-exceptions
> -fno-rtti -fcf-protection=none -std=c++14 -MD -MT
> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -MF
> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o.d -o
> tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -c
> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp
> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:
> In function ‘void makeStatepointExplicitImpl(llvm::CallBase*,
> llvm::SmallVectorImpl&, llvm::SmallVectorImpl&,
> {anonymous}::PartiallyConstructedSafepointRecord&,
> std::vector<{anonymous}::DeferredReplacement>&)’:
> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1433:65:
> warning: ‘llvm::Type* llvm::PointerType::getElementType() const’ is
> deprecated: Pointer element types are deprecated. You can *temporarily* use
> Type::getPointerElementType() instead [-Wdeprecated-declarations]
>  1433 |   Type *T = cast(V->getType())->getElementType();
>   | ^
> In file included from
> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Function.h:29,
>  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/DerivedTypes.h:675:9:
> note: declared here
>   675 |   Type *getElementType() const {
>   | ^~
> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1517:27:
> error: no matching function for call to
> ‘llvm::IRBuilder<>::CreateGCStatepointInvoke(uint64_t&, uint32_t&,
> llvm::Value*&, llvm::BasicBlock*, llvm::BasicBlock*,
> llvm::ArrayRef&, llvm::ArrayRef&,
> llvm::ArrayRef, const char [17])’
>  1517 | "statepoint_token");
>   |   ^
> In file included from
> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:45:
> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:809:3:
> note: candidate: ‘llvm::InvokeInst*
> llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
> llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*,
> llvm::ArrayRef, llvm::Optional
> >, llvm::ArrayRef, const llvm::Twine&)’
>   809 |   CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes,
>   |   ^~~~
> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:810:43:
> note:   no known conversion for argument 3 from ‘llvm::Value*’ to
> ‘llvm::FunctionCallee’
>   810 |FunctionCallee ActualInvokee,
> BasicBlock *NormalDest,
>   |~~~^
> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15:
> note: candidate: ‘llvm::InvokeInst*
> llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
> llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*, uint32_t,
> llvm::ArrayRef, llvm::Optional >,
> llvm::Optional >, llvm::ArrayRef,
> const llvm::Twine&)’
>   817 |   InvokeInst *CreateGCStatepointInvoke(
>   |   ^~~~
> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15:
> note:   candidate expects 11 arguments, 9 provided
> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:828:3:
> note: candidate: ‘llvm::InvokeInst*
> llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
> llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*,
> llvm::ArrayRef, llvm::Optional >,
> 

Re: [go-nuts] Re: gollvm compilation issue

2022-02-09 Thread Zhen Huang
Thank you for the prompt response! I checked out the updated code and the
previous compilation error is gone. However, another compilation error came
up:

[183/1626] Building CXX object
tools/g...LVMCppGoPasses.dir/GoStatepoints.cpp.o
FAILED:
tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o
/usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-Itools/gollvm/passes
-I/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes -Iinclude
-I/home/user/code/llvm/llvm-project/llvm/include -fPIC
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
-Wmisleading-indentation -fdiagnostics-color -g-fno-exceptions
-fno-rtti -fcf-protection=none -std=c++14 -MD -MT
tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -MF
tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o.d -o
tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -c
/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp
/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:
In function ‘void makeStatepointExplicitImpl(llvm::CallBase*,
llvm::SmallVectorImpl&, llvm::SmallVectorImpl&,
{anonymous}::PartiallyConstructedSafepointRecord&,
std::vector<{anonymous}::DeferredReplacement>&)’:
/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1433:65:
warning: ‘llvm::Type* llvm::PointerType::getElementType() const’ is
deprecated: Pointer element types are deprecated. You can *temporarily* use
Type::getPointerElementType() instead [-Wdeprecated-declarations]
 1433 |   Type *T = cast(V->getType())->getElementType();
  | ^
In file included from
/home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Function.h:29,
 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/DerivedTypes.h:675:9:
note: declared here
  675 |   Type *getElementType() const {
  | ^~
/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1517:27:
error: no matching function for call to
‘llvm::IRBuilder<>::CreateGCStatepointInvoke(uint64_t&, uint32_t&,
llvm::Value*&, llvm::BasicBlock*, llvm::BasicBlock*,
llvm::ArrayRef&, llvm::ArrayRef&,
llvm::ArrayRef, const char [17])’
 1517 | "statepoint_token");
  |   ^
In file included from
/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:45:
/home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:809:3:
note: candidate: ‘llvm::InvokeInst*
llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*,
llvm::ArrayRef, llvm::Optional
>, llvm::ArrayRef, const llvm::Twine&)’
  809 |   CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes,
  |   ^~~~
/home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:810:43:
note:   no known conversion for argument 3 from ‘llvm::Value*’ to
‘llvm::FunctionCallee’
  810 |FunctionCallee ActualInvokee, BasicBlock
*NormalDest,
  |~~~^
/home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15:
note: candidate: ‘llvm::InvokeInst*
llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*, uint32_t,
llvm::ArrayRef, llvm::Optional >,
llvm::Optional >, llvm::ArrayRef,
const llvm::Twine&)’
  817 |   InvokeInst *CreateGCStatepointInvoke(
  |   ^~~~
/home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15:
note:   candidate expects 11 arguments, 9 provided
/home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:828:3:
note: candidate: ‘llvm::InvokeInst*
llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t,
llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*,
llvm::ArrayRef, llvm::Optional >,
llvm::ArrayRef, const llvm::Twine&)’
  828 |   CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes,
  |   ^~~~
/home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:829:43:
note:   no known conversion for argument 3 from 

[go-nuts] Re: gollvm compilation issue

2022-02-08 Thread eric...@arm.com
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 写道:

> 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 (const AttributeMask );
>   |   ~^~
>

-- 
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.