This is an archive of the discontinued LLVM Phabricator instance.

[opt] Initialize WriteBitcode pass.
ClosedPublic

Authored by Meinersbur on Oct 24 2017, 1:38 AM.

Details

Summary

Probably due to a change of how some pass initializes its dependency, the -write-bitcode pass (BitcodeWriterPass.cpp) is not initialized in opt and therefore not available in the pass list anymore.

Explicitly call initializeWriteBitcodePassPass() to make it available again in opt.

Alternatively, is there an initializeBitcode{Reader/Writer}() function that initializes all passes from the Bitcode lib?

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Oct 24 2017, 1:38 AM
MatzeB accepted this revision.Oct 24 2017, 9:53 AM

Seems obvious, LGTM.

Alternatively, is there an initializeBitcode{Reader/Writer}() function that initializes all passes from the Bitcode lib?

The reader and writer are in separate libraries, aren't they?

This revision is now accepted and ready to land.Oct 24 2017, 9:53 AM

Alternatively, is there an initializeBitcode{Reader/Writer}() function that initializes all passes from the Bitcode lib?

The reader and writer are in separate libraries, aren't they?

Yes, they are. WriteBitcodePass is the only pass in these libraries (None in LLVMBitReader). I was speculating because other libraries have a common initializeXYZ().

This revision was automatically updated to reflect the committed changes.