Commit Graph

57 Commits

Author SHA1 Message Date
Chris Lattner
2f9e91d267 make an 'else' block unconditional, aborting if the cast<> fails. The
old code would end up dereferencing an uninitialized pointer in the case
where the cast would fail, it is better to explode violently.
2016-04-12 21:07:28 -07:00
Slava Pestov
b898f43972 Reflection: Fix memory management issue in swift-reflection-dump
MachOUniversalBinary::getObjectForArch() returns a value containing
a unique_ptr; if we just fish out the unique_ptr value using get(),
it will be freed too soon.

Instead, hold on to the unique_ptr until we are done with everything.
2016-04-12 19:15:37 -07:00
Slava Pestov
39f0fff19d Reflection: Small stylistic cleanups, NFC 2016-04-12 19:15:36 -07:00
John McCall
91f02848df Organize the MemoryReader interface headers to better support
multiple clients.
2016-04-12 16:05:29 -07:00
David Farler
358a0fefe8 Add SwiftRemoteMirror library
This will wrap the ./lib/Reflection functionality in a C
interface.
2016-04-05 13:45:46 -07:00
practicalswift
cd41538162 [gardening] Fix file header formatting. 2016-03-30 18:20:50 +02:00
David Farler
5ea5bb06a3 Split swift-refleciton-test into host and target test targets
swift-reflection-test is now the test that forks a swift executable
and performs remote reflection, making it runnable on other targets,
such as the iOS simulator.

swift-reflection-dump is now a host-side tool that dumps the remote
reflection sections for any platform binary and will continue to
link in LLVM object file support.

This necessitates finally moving lib/Refleciton into stdlib/public,
since we're linking target-specific versions of the test tool and
we would eventually like to adopt some of this functionality in
the runtime anyway.
2016-03-28 16:34:44 -07:00