Page MenuHomePhabricator

[TextAPI] Update reader to be supported by lib/Object
ClosedPublic

Authored by cishida on Tue, Aug 13, 9:12 AM.

Details

Summary

To be able to use the TextAPI/Reader for tbd file consumption (by libObject)
it gets passed a MemoryBufferRef which isn't castable to MemoryBuffer.
Updated the tests to expect that input as well.

Diff Detail

Repository
rL LLVM

Event Timeline

cishida created this revision.Tue, Aug 13, 9:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Aug 13, 9:12 AM
cishida edited the summary of this revision. (Show Details)Tue, Aug 13, 9:21 AM
steven_wu accepted this revision.Tue, Aug 13, 1:26 PM

LGTM

llvm/include/llvm/TextAPI/MachO/TextAPIReader.h
25 ↗(On Diff #214853)

What happened to this function? Is this declared and never implemented?

This revision is now accepted and ready to land.Tue, Aug 13, 1:26 PM
cishida marked an inline comment as done.Tue, Aug 13, 1:32 PM

I currently don't have commit access, so would anyone mind pushing this up to master?

llvm/include/llvm/TextAPI/MachO/TextAPIReader.h
25 ↗(On Diff #214853)

yep, never created an error because it was never called by anything

ributzka added inline comments.Tue, Aug 13, 2:01 PM
llvm/lib/TextAPI/MachO/TextStub.cpp
638 ↗(On Diff #214853)

Why did this move? Won't that leak the memory in the error case?

cishida updated this revision to Diff 214968.Tue, Aug 13, 4:18 PM

[TextAPI] prevent memory leak for Interface File

cishida marked an inline comment as done.Tue, Aug 13, 4:19 PM
cishida added inline comments.
llvm/lib/TextAPI/MachO/TextStub.cpp
638 ↗(On Diff #214853)

resolved offline

This revision was automatically updated to reflect the committed changes.