Skip to content
Snippets Groups Projects
Commit c8da635d authored by Petr Rockai's avatar Petr Rockai
Browse files

bricks: Update LLVM bricks to build with LLVM version 7.

parent 8c4144cb
No related branches found
No related tags found
No related merge requests found
......@@ -235,7 +235,7 @@ inline void writeModule( ::llvm::Module *m, std::string out ) {
::llvm::raw_fd_ostream fs( out.c_str(), serr, ::llvm::sys::fs::F_None );
if ( serr )
_throwLLVMError( serr );
WriteBitcodeToFile( m, fs );
WriteBitcodeToFile( *m, fs );
}
inline std::string getModuleBytes( ::llvm::Module *m ) {
......@@ -243,7 +243,7 @@ inline std::string getModuleBytes( ::llvm::Module *m ) {
verifyModule( *m );
{
::llvm::raw_string_ostream fs( s );
WriteBitcodeToFile( m, fs );
WriteBitcodeToFile( *m, fs );
}
return s;
}
......
......@@ -115,7 +115,7 @@ inline void writeArchive( It begin, It end, std::string out )
throw std::runtime_error( "member " + bc.second + " multiply defined creating " + out );
::llvm::raw_string_ostream stream( bc.first );
::llvm::WriteBitcodeToFile( mod.get(), stream );
::llvm::WriteBitcodeToFile( *mod.get(), stream );
stream.flush();
members.emplace_back( ::llvm::MemoryBufferRef( bc.first, bc.second ) );
......@@ -330,7 +330,7 @@ struct Linker {
using StringRef = ::llvm::StringRef;
void link( Module &src ) {
return link( std::unique_ptr< Module >( ::llvm::CloneModule( &src ) ) );
return link( std::unique_ptr< Module >( ::llvm::CloneModule( src ) ) );
}
void link_decls( std::unique_ptr< Module > src )
......@@ -461,7 +461,7 @@ struct Linker {
template< typename It >
static std::unique_ptr< Module > _takeModule( It it ) {
return std::unique_ptr< Module >( ::llvm::CloneModule( *it ) );
return std::unique_ptr< Module >( ::llvm::CloneModule( **it ) );
}
static std::unique_ptr< Module > _takeModule( ArchiveReader::BitcodeIterator &bcit ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment