This is an archive of the discontinued LLVM Phabricator instance.

[llvm-bcanalyzer] Refactor and move to libLLVMBitReader
ClosedPublic

Authored by thegameg on Jul 2 2019, 5:44 PM.

Details

Summary

This allows us to use the analyzer from unit tests.

  • Refactor the interface to use proper error handling for most functions after JF's work.
  • Move everything into a BitstreamAnalyzer class.
  • Move that to Bitcode/BitcodeAnalyzer.h.

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg created this revision.Jul 2 2019, 5:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2019, 5:44 PM
JDevlieghere added inline comments.Jul 3 2019, 10:49 AM
llvm/include/llvm/Bitcode/BitcodeAnalyzer.h
36 ↗(On Diff #207672)

Given that this is now in the llvm namespace, maybe rename this to BCDumpOptions?

thegameg updated this revision to Diff 207868.Jul 3 2019, 12:55 PM
thegameg marked an inline comment as done.

s/DumpOptions/BCDumpOptions

JDevlieghere accepted this revision.Jul 3 2019, 3:21 PM

LGTM, with one minor nit inline. Thanks for doing this, Francis!

llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
73 ↗(On Diff #207868)

s/memBufOrErr/MemBufOrErr/

This revision is now accepted and ready to land.Jul 3 2019, 3:21 PM
This revision was automatically updated to reflect the committed changes.