staticafi/llvm2c

Build on LLVM 8.0.0 fails

mchalupa opened this issue · 1 comments

/var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.cpp: In member function ‘bool Block::isVoidType(llvm::DIType*)’:
/var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.cpp:37:39: error: invalid user-defined conversion from ‘llvm::DITypeRef’ {aka ‘llvm::TypedDINodeRef<llvm::DIType>’} to ‘llvm::DIType*’ [-fpermissive]
   return isVoidType(dtype->getBaseType());
                     ~~~~~~~~~~~~~~~~~~^~
In file included from /var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.h:8,
                 from /var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.cpp:2:
/var/tmp/xchalup4/symbiotic-jakub/llvm-8.0.0/include/llvm/IR/DebugInfoMetadata.h:90:3: note: candidate is: ‘llvm::TypedDINodeRef<T>::operator llvm::Metadata*() const [with T = llvm::DIType]’ <near match>
   operator Metadata *() const { return const_cast<Metadata *>(MD); }
   ^~~~~~~~
/var/tmp/xchalup4/symbiotic-jakub/llvm-8.0.0/include/llvm/IR/DebugInfoMetadata.h:90:3: note:   no known conversion from ‘llvm::Metadata*’ to ‘llvm::DIType*’
/var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.cpp:31:6: note:   initializing argument 1 of ‘bool Block::isVoidType(llvm::DIType*)’
 bool Block::isVoidType(llvm::DIType* type) {
      ^~~~~
/var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.cpp:45:39: error: invalid user-defined conversion from ‘llvm::DITypeRef’ {aka ‘llvm::TypedDINodeRef<llvm::DIType>’} to ‘llvm::DIType*’ [-fpermissive]
   return isVoidType(ctype->getBaseType());
                     ~~~~~~~~~~~~~~~~~~^~
In file included from /var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.h:8,
                 from /var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.cpp:2:
/var/tmp/xchalup4/symbiotic-jakub/llvm-8.0.0/include/llvm/IR/DebugInfoMetadata.h:90:3: note: candidate is: ‘llvm::TypedDINodeRef<T>::operator llvm::Metadata*() const [with T = llvm::DIType]’ <near match>
   operator Metadata *() const { return const_cast<Metadata *>(MD); }
   ^~~~~~~~
/var/tmp/xchalup4/symbiotic-jakub/llvm-8.0.0/include/llvm/IR/DebugInfoMetadata.h:90:3: note:   no known conversion from ‘llvm::Metadata*’ to ‘llvm::DIType*’
/var/tmp/xchalup4/symbiotic-jakub/llvm2c/core/Block.cpp:31:6: note:   initializing argument 1 of ‘bool Block::isVoidType(llvm::DIType*)’
 bool Block::isVoidType(llvm::DIType* type) {
      ^~~~~
make[2]: *** [CMakeFiles/llvm2c.dir/build.make:89: CMakeFiles/llvm2c.dir/core/Block.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Reverting 1612cf9 fixes this problem.

Turns out the function that caused the issue was never used. It was deleted in 7cbd456 and the build should now both under LLVM 8 and 9. I tested it with LLVM 9 and LLVM 8.0.1 as part of Symbiotic.