1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/tools
Greg Clayton 89a8c0a52c Clean up DWARFFormValue by reducing duplicated code and removing DWARFFormValue::getFixedFormSizes()
In preparation for a follow on patch that improves DWARF parsing speed, clean up DWARFFormValue so that we have can get the fixed byte size of a form value given a DWARFUnit or given the version, address byte size and dwarf32/64.

This patch cleans up code so that everyone is using one of the new DWARFFormValue functions:

static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, const DWARFUnit *U = nullptr);
static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, uint16_t Version, uint8_t AddrSize, bool Dwarf32);

This patch changes DWARFFormValue::skipValue() to rely on the output of DWARFFormValue::getFixedByteSize(...) instead of duplicating the code in each function. This will reduce the number of changes we need to make to DWARF to fewer places in DWARFFormValue when we add support for new form.

This patch also starts to support DWARF64 so that we can get correct byte sizes for forms that vary according the DWARF 32/64.

To reduce the code duplication a new FormSizeHelper pure virtual class was created that can be created as a FormSizeHelperDWARFUnit when you have a DWARFUnit, or FormSizeHelperManual where you manually specify the DWARF version, address byte size and DWARF32/DWARF64. There is now a single implementation of a function that gets the fixed byte size (instead of two where one took a DWARFUnit and one took the DWARF version, address byte size and DWARFFormat enum) and one function to skip the form values.

https://reviews.llvm.org/D26526

llvm-svn: 286597
2016-11-11 16:21:37 +00:00
..
bugpoint Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
bugpoint-passes Remove autoconf support 2016-01-26 21:29:08 +00:00
dsymutil Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
gold Fix gold plugin after Error API changes 2016-11-11 06:04:30 +00:00
llc Revert "Use StringRef instead of raw pointer in TargetRegistry API (NFC)" 2016-10-01 07:08:23 +00:00
lli Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
llvm-ar Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
llvm-as Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
llvm-as-fuzzer Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-bcanalyzer Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
llvm-c-test Add support for callsite in the new C API for attributes 2016-06-15 05:14:29 +00:00
llvm-config Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
llvm-cov [llvm-cov] Turn line numbers in html reports into clickable links 2016-11-02 19:44:13 +00:00
llvm-cxxdump Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
llvm-cxxfilt [llvm-cxxfilt] Use llvm::outs(). Simplify. 2016-09-27 18:50:30 +00:00
llvm-diff [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-dis Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
llvm-dwarfdump dwarfdump: -summarize-types: print a short summary (unqualified type name, hash, length) of type units rather than dumping contents 2016-10-18 21:09:48 +00:00
llvm-dwp Clean up DWARFFormValue by reducing duplicated code and removing DWARFFormValue::getFixedFormSizes() 2016-11-11 16:21:37 +00:00
llvm-extract [tools] Unbreak the GCC build (workaround a GCC bug). 2016-11-09 21:30:33 +00:00
llvm-go [llvm-go] parameterize $GOPATH construction 2016-07-27 03:21:51 +00:00
llvm-jitlistener Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-link Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
llvm-lto Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
llvm-lto2 [ThinLTO] Disable importing and other cross-module optis at -O0 2016-10-31 22:12:21 +00:00
llvm-mc [MC] Make llvm-mc fail cleanly on invalid output asm variant. 2016-10-31 18:36:31 +00:00
llvm-mc-fuzzer Turn cl::values() (for enum) from a vararg function to using C++ variadic template 2016-10-08 19:41:06 +00:00
llvm-mcmarkup Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-nm Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
llvm-objdump Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
llvm-opt-report [llvm-opt-report] Fix unroll-count reporting 2016-10-24 05:07:18 +00:00
llvm-pdbdump [CodeView] Hook up CodeViewRecordIO to type serialization path. 2016-11-08 22:24:53 +00:00
llvm-profdata [PGO] Fix a use-after-move. NFC. 2016-10-19 23:31:59 +00:00
llvm-readobj Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
llvm-rtdyld Turn cl::values() (for enum) from a vararg function to using C++ variadic template 2016-10-08 19:41:06 +00:00
llvm-shlib Fix llvm-shlib cmake build 2016-11-01 20:19:33 +00:00
llvm-size Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
llvm-split Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
llvm-stress Use StringRef in CommandLine Options handling (NFC) 2016-10-01 03:43:20 +00:00
llvm-strings llvm-strings: Fix r286556 to add required libraries. 2016-11-11 14:17:37 +00:00
llvm-symbolizer Turn cl::values() (for enum) from a vararg function to using C++ variadic template 2016-10-08 19:41:06 +00:00
llvm-xray Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
lto Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
msbuild
obj2yaml Remove the last use of report_fatal_error from ELF.h. 2016-11-03 19:07:15 +00:00
opt Revert "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-09 01:45:13 +00:00
sancov Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
sanstats [Symbolize] Check if the PE file has a PDB and emit an error if we can't load it 2016-06-03 20:25:09 +00:00
verify-uselistorder Split Bitcode/ReaderWriter.h into separate reader and writer headers 2016-11-11 05:34:58 +00:00
xcode-toolchain [CMake] Minor fix to regex in r279152 2016-08-18 21:36:36 +00:00
yaml2obj Misc improvements to StringTableBuilder. 2016-10-04 22:43:25 +00:00
CMakeLists.txt Fixup r271533, or check-clang didn't find llvm-lto as the target. 2016-06-02 20:39:24 +00:00
LLVMBuild.txt llvm-dwp: Initial layout 2015-12-01 00:48:34 +00:00