1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/tools
Zachary Turner 5f8e1427eb [CodeView] Simplify the use of visiting type records & streams.
There is often a lot of boilerplate code required to visit a type
record or type stream.  The #1 use case is that you have a sequence
of bytes that represent one or more records, and you want to
deserialize each one, switch on it, and call a callback with the
deserialized record that the user can examine.  Currently this
requires at least 6 lines of code:

  codeview::TypeVisitorCallbackPipeline Pipeline;
  Pipeline.addCallbackToPipeline(Deserializer);
  Pipeline.addCallbackToPipeline(MyCallbacks);

  codeview::CVTypeVisitor Visitor(Pipeline);
  consumeError(Visitor.visitTypeRecord(Record));

With this patch, it becomes one line of code:

  consumeError(codeview::visitTypeRecord(Record, MyCallbacks));

This is done by having the deserialization happen internally inside
of the visitTypeRecord function.  Since this is occasionally not
desirable, the function provides a 3rd parameter that can be used
to change this behavior.

Hopefully this can significantly reduce the barrier to entry
to using the visitation infrastructure.

Differential Revision: https://reviews.llvm.org/D33245

llvm-svn: 303271
2017-05-17 16:39:06 +00:00
..
bugpoint Suppress all uses of LLVM_END_WITH_NULL. NFC. 2017-05-09 19:31:13 +00:00
bugpoint-passes
dsymutil [DWARF] - Take relocations in account when extracting ranges from .debug_ranges 2017-04-24 10:19:45 +00:00
gold Re-apply r299168 and r299169 now that the libdeps are fixed. 2017-03-31 04:47:07 +00:00
llc [X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics to run also on -O0 option. 2017-05-15 11:30:54 +00:00
lli [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH 2017-05-09 21:32:18 +00:00
llvm-ar Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI. 2017-05-13 22:06:46 +00:00
llvm-as
llvm-as-fuzzer
llvm-bcanalyzer Bitcode: Add a string table to the bitcode format. 2017-04-17 17:51:36 +00:00
llvm-c-test Spelling mistakes in comments. NFCI. 2017-03-30 12:59:53 +00:00
llvm-cat Bitcode: Add a string table to the bitcode format. 2017-04-17 17:51:36 +00:00
llvm-config [CMake] Use variable interpolation instead of string concatenation 2017-03-22 12:06:11 +00:00
llvm-cov [ProfileData] Unify getInstrProf*SectionName helpers 2017-04-15 00:09:57 +00:00
llvm-cvtres Add empty shell of llvm-cvtres. 2017-04-21 17:30:29 +00:00
llvm-cxxdump
llvm-cxxfilt c++filt: support COFF import thunks 2017-03-22 21:15:19 +00:00
llvm-diff [IR] Redesign the case iterator in SwitchInst to actually be an iterator 2017-04-12 07:27:28 +00:00
llvm-dis
llvm-dwarfdump Adds initial llvm-dwarfdump --verify support with unit tests. 2017-05-01 22:07:02 +00:00
llvm-dwp
llvm-extract [llvm-extract] Add option for recursive extraction 2017-04-06 20:51:40 +00:00
llvm-go
llvm-jitlistener
llvm-link Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI." 2017-05-04 18:03:25 +00:00
llvm-lto Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI." 2017-05-04 18:03:25 +00:00
llvm-lto2 Object, LTO: Add target triple to irsymtab and LTO API. 2017-04-14 02:55:06 +00:00
llvm-mc [DWARFv5] llvm-mc support for new unit header. 2017-02-28 23:40:46 +00:00
llvm-mc-assemble-fuzzer llvm-mc-fuzzer: add support for assembly 2017-02-27 06:22:17 +00:00
llvm-mc-disassemble-fuzzer llvm-mc-fuzzer: add support for assembly 2017-02-27 06:22:17 +00:00
llvm-mcmarkup
llvm-modextract Bitcode: Add a string table to the bitcode format. 2017-04-17 17:51:36 +00:00
llvm-nm [WebAssembly] Improve readobj and nm support for wasm 2017-04-14 19:50:44 +00:00
llvm-objdump [llvm-objdump] Don't attempt to print lines beyond the end of file 2017-04-25 18:56:33 +00:00
llvm-opt-report
llvm-pdbdump [CodeView] Simplify the use of visiting type records & streams. 2017-05-17 16:39:06 +00:00
llvm-profdata Resubmit r297897: [PGO] Value profile for size of memory intrinsic calls 2017-03-16 21:15:48 +00:00
llvm-readobj [llvm-readobj] Improve errors on invalid binary 2017-05-10 14:18:11 +00:00
llvm-rtdyld [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH 2017-05-09 21:32:18 +00:00
llvm-shlib CMake: Add LLVM_DYLIB_SYMBOL_VERSIONING option 2017-05-03 14:43:44 +00:00
llvm-size
llvm-split
llvm-stress Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
llvm-strings
llvm-symbolizer
llvm-xray [XRay][tools] Remove wayward semicolon (NFC) 2017-04-26 03:49:49 +00:00
lto Spelling mistakes in comments. NFCI. 2017-03-30 12:59:53 +00:00
msbuild Create msbuild only when using MSVC 2017-03-16 20:24:14 +00:00
obj2yaml [WebAssembly] Fix build error in wasm YAML code 2017-05-10 00:14:04 +00:00
opt [X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics to run also on -O0 option. 2017-05-15 11:30:54 +00:00
sancov [sancov] Fix broken links and displaced coloring in coverage-report-server.py 2017-03-20 14:06:04 +00:00
sanstats
verify-uselistorder
xcode-toolchain
yaml2obj [WebAssembly] Fix build error in wasm YAML code 2017-05-10 00:14:04 +00:00
CMakeLists.txt
LLVMBuild.txt Add llvm-cvtres to LLVMBuild.txt 2017-04-21 17:37:31 +00:00