This is an archive of the discontinued LLVM Phabricator instance.

Split Bitcode/ReaderWriter.h into separate reader and writer headers
ClosedPublic

Authored by tejohnson on Nov 10 2016, 7:09 AM.

Details

Summary

Split ReaderWriter.h which contains the APIs into both the BitReader and
BitWriter libraries into BitcodeReader.h and BitcodeWriter.h.

This is to address Chandler's concern about sharing the same API header
between multiple libraries (BitReader and BitWriter). That concern is
why we create a single bitcode library in our downstream build of clang,
which led to r286297 being reverted as it added a dependency that
created a cycle only when there is a single bitcode library (not two as
in upstream).

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 77480.Nov 10 2016, 7:09 AM
tejohnson retitled this revision from to Split Bitcode/ReaderWriter.h into separate reader and writer headers.
tejohnson updated this object.
tejohnson added a reviewer: chandlerc.
tejohnson added subscribers: llvm-commits, mehdi_amini, dlj.
mehdi_amini accepted this revision.Nov 10 2016, 2:54 PM
mehdi_amini added a reviewer: mehdi_amini.

LGTM.

But there are used of ReaderWriter.h in clang and lld.

This revision is now accepted and ready to land.Nov 10 2016, 2:54 PM

LGTM.

But there are used of ReaderWriter.h in clang and lld.

Thanks for pointing that out. I had already made the clang changes (necessary to test these changes), but forgot to put them in a patch. I will clone lld into my working tree and make the changes there and make sure it builds before I commit the changes to all three components back to back.

Just FYI: I documented how to work across projects and have a single commit using a monorepo here: http://llvm.org/docs/GettingStarted.html#for-developers-to-work-with-a-git-monorepo

llvm/trunk/include/llvm/Bitcode/BitcodeReader.h