llvm-project/llvm/lib
Zachary Turner ad859bd472 [CodeView] Fix random access of type names.
Suppose we had a type index offsets array with a boundary at type index
N. Then you request the name of the type with index N+1, and that name
requires the name of index N-1 (think a parameter list, for example). We
didn't handle this, and we would print something like (<unknown UDT>,
<unknown UDT>).

The fix for this is not entirely trivial, and speaks to a larger
problem. I think we need to kill TypeDatabase, or at the very least kill
TypeDatabaseVisitor. We need a thing that doesn't do any caching
whatsoever, just given a type index it can compute the type name "the
slow way". The reason for the bug is that we don't have anything like
that. Everything goes through the type database, and if we've visited a
record, then we're "done". It doesn't know how to do the expensive thing
of re-visiting dependent records if they've not yet been visited.

What I've done here is more or less copied the code (albeit greatly
simplified) from TypeDatabaseVisitor, but wrapped it in an interface
that just returns a std::string. The logic of caching the name is now in
LazyRandomTypeCollection. Eventually I'd like to move the record
database here as well and the visited record bitfield here as well, at
which point we can actually just delete TypeDatabase. I don't see any
reason for it if a "sequential" collection is just a special case of a
random access collection with an empty partial offsets array.

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

llvm-svn: 305612
2017-06-16 23:42:44 +00:00
..
Analysis DivergencyAnalysis patch for review 2017-06-15 19:33:10 +00:00
AsmParser Add dependency from AsmParser to BinaryFormat. 2017-06-07 04:24:33 +00:00
BinaryFormat Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
Bitcode Fix build warning on 32-bit targets where sizeof(size_t) < sizeof(long long). 2017-06-16 00:32:11 +00:00
CodeGen [SelectionDAG] Use APInt::isSubsetOf. NFC 2017-06-16 23:19:14 +00:00
DebugInfo [CodeView] Fix random access of type names. 2017-06-16 23:42:44 +00:00
Demangle [ItaniumDemangle] Fix a exponential string copying bug 2017-05-28 23:24:52 +00:00
ExecutionEngine Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
Fuzzer [libFuzzer] change the default max_len from 64 to 4096. This will affect cases where libFuzzer is run w/o initial corpus or with a corpus of very small items. 2017-06-15 22:43:40 +00:00
IR [ConstantRange] Implement getSignedMin/Max in a less complicated and faster way 2017-06-16 23:26:23 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO Silence warning with assertions disabled. 2017-06-15 17:41:32 +00:00
LineEditor
Linker Support for taking the max of module flags when linking, use for PIE/PIC 2017-05-23 00:08:00 +00:00
MC MC, Object: Reserve a section type, SHT_LLVM_ODRTAB, for the ODR table. 2017-06-14 18:52:12 +00:00
Object Clean up some things in the WindowsResource changes. 2017-06-16 22:00:42 +00:00
ObjectYAML Resubmit "[llvm-pdbutil] rewrite the "raw" output style." 2017-06-15 22:24:24 +00:00
Option [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
Passes [EarlyCSE] Add option to use MemorySSA for function simplification run of EarlyCSE (off by default). 2017-06-10 15:20:03 +00:00
ProfileData Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Support Fix buildbots. 2017-06-16 02:42:33 +00:00
TableGen [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
Target bpf: fix a strict-aliasing issue 2017-06-16 23:28:04 +00:00
Testing [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00
ToolDrivers Add dependency from LibDriver to BinaryFormat. 2017-06-07 04:39:50 +00:00
Transforms Revert rL305578. There is still some buildbot failure to be fixed. 2017-06-16 23:14:35 +00:00
XRay Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
CMakeLists.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00
LLVMBuild.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00