| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Previously it was storing all the fields of an msf::Layout as
separate members. This is a trivial cleanup to make it store
an msf::Layout directly. This makes the code more readable
since it becomes clear which fields of PDBFile are actually the
msf specific layout information in a sea of other bookkeeping
fields.
llvm-svn: 276460
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it easier to have the writable and readable PDB
interfaces share code since the read/write and write-only
interfaces now share a single allocator, you don't have to worry
about a builder building a read only interface and then having
the read-only interface's data become corrupt when the builder
goes out of scope. Now the allocator is specified explicitly
to all constructors, so all interfaces can share a single allocator
that is scoped appropriately.
llvm-svn: 276459
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This provides a better layering of responsibilities among different
aspects of PDB writing code. Some of the MSF related code was
contained in CodeView, and some was in PDB prior to this. Further,
we were often saying PDB when we meant MSF, and the two are
actually independent of each other since in theory you can have
other types of data besides PDB data in an MSF. So, this patch
separates the MSF specific code into its own library, with no
dependencies on anything else, and DebugInfoCodeView and
DebugInfoPDB take dependencies on DebugInfoMsf.
llvm-svn: 276458
|
| |
|
|
|
|
|
|
| |
This facilitates code reuse between the builder classes and the
"frozen" read only versions of the classes used for parsing
existing PDB files.
llvm-svn: 276427
|
| |
|
|
|
|
|
|
|
|
| |
This implements support for writing compiland and compiland source
file info to a binary PDB. This is tested by adding support for
dumping these fields from an existing PDB to yaml, reading them
back in, and dumping them again and verifying the values are as
expected.
llvm-svn: 276426
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This change adds a hasFileAtIndex method. getChildDeclContext can first call this method, and if it returns true it knows it can then lookup the resolved path cache for the given file index. If we hit that cache then we don't even have to call getFileNameByIndex.
Running dsymutil against the swift executable built from github gives a 20% performance improvement without any change in the binary.
Differential Revision: https://reviews.llvm.org/D22655
Reviewed by friss.
llvm-svn: 276380
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Block 1 and 2 of an MSF file are bit vectors that represent the
list of blocks allocated and free in the file. We had been using
these blocks to write stream data and other data, so we mark them
as the free page map now. We don't yet serialize these pages to
the disk, but at least we make a note of what it is, and avoid
writing random data to them.
Doing this also necessitated cleaning up some of the tests to be
more general and hardcode fewer values, which is nice.
llvm-svn: 275629
|
| |
|
|
| |
llvm-svn: 275628
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would read a PDB, then write some of it back out,
but write the directory, super block, and other pertinent metadata
back out unchanged. This generates incorrect PDBs since the amount
of data written was not always the same as the amount of data read.
This patch changes things to use the newly introduced `MsfBuilder`
class to write out a correct and accurate set of Msf metadata for
the data *actually* written, which opens up the door for adding and
removing type records, symbol records, and other types of data to
an existing PDB.
llvm-svn: 275627
|
| |
|
|
|
|
| |
Fix a few initialization ordering warnings from gcc from `-Wreorder`. NFC.
llvm-svn: 275615
|
| |
|
|
|
|
|
| |
Reviewed by: ruiu
Differential Revision: https://reviews.llvm.org/D22308
llvm-svn: 275611
|
| |
|
|
| |
llvm-svn: 275152
|
| |
|
|
|
|
|
| |
We didn't read unique names correctly. As a result, we computed
hashes on (non-)unique names instead of unique names.
llvm-svn: 275150
|
| |
|
|
| |
llvm-svn: 275110
|
| |
|
|
| |
llvm-svn: 275014
|
| |
|
|
|
|
|
|
| |
Some abstractions in LLVM "know" that they are reading in-bounds,
FixedStreamArray, and provide a simple result. This breaks down if the
stream map is bogus.
llvm-svn: 275010
|
| |
|
|
|
|
|
| |
PDBFile::getBlockData didn't really return any indication that it
failed. It merely returned an empty buffer.
llvm-svn: 275009
|
| |
|
|
|
|
|
| |
We emitted debug info for globals/functions as if they all had external
linkage. Instead, emit local symbol records when appropriate.
llvm-svn: 274676
|
| |
|
|
|
|
| |
This gets writing of the PDB stream working.
llvm-svn: 274647
|
| |
|
|
| |
llvm-svn: 274639
|
| |
|
|
|
|
|
| |
This helps to mitigate the conflict between COFF.h and winnt.h, which is
PR28399.
llvm-svn: 274637
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This issue was encountered on libcmt.pdb, which has a type record that
looks like this:
Struct (0x1094) {
TypeLeafKind: LF_STRUCTURE (0x1505)
MemberCount: 3
Properties [ (0x200)
HasUniqueName (0x200)
]
FieldList: <field list> (0x1093)
DerivedFrom: 0x0
VShape: 0x0
SizeOf: 4
Name: <unnamed-tag>
LinkageName: .?AU<unnamed-tag>@@
}
The checks for startswith/endswith "<unnamed-tag>" should look at the
display name, not the linkage name.
llvm-svn: 274376
|
| |
|
|
| |
llvm-svn: 274309
|
| |
|
|
| |
llvm-svn: 274308
|
| |
|
|
|
|
|
|
|
| |
Somehow all the functionality to write PDB files got removed,
probably accidentally when uploading the patch perhaps the wrong
one got uploaded. This re-adds all the code, as well as the
corresponding test.
llvm-svn: 274248
|
| |
|
|
|
|
|
| |
Make sure strings don't get too big for a record, truncate them if
need-be.
llvm-svn: 273710
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow
a good error message to be produced.
This is nearly the last libObject interface that used ErrorOr and the last one
that appears in llvm/include/llvm/Object/MachO.h . For Mach-O objects this is
just a clean up because it’s version of getSymbolAddress() can’t return an
error.
I will leave it to the experts on COFF and ELF to actually add meaning full
error messages in their tests if they wish. And also leave it to these experts
to change the last two ErrorOr interfaces in llvm/include/llvm/Object/ObjectFile.h
for createCOFFObjectFile() and createELFObjectFile() if they wish.
Since there are no test cases for COFF and ELF error cases with respect to
getSymbolAddress() in the test suite this is no functional change (NFC).
llvm-svn: 273701
|
| |
|
|
|
|
|
|
|
|
| |
We bailed out while printing codeview for an MSVC compiled
SemaExprCXX.cpp that used this record. The MS reference headers look
incorrect here, which is probably why we had this bug. They use a 32-bit
enum as the field type, but the actual record appears to use one byte
for the cookie kind followed by a flags byte.
llvm-svn: 273691
|
| |
|
|
|
|
| |
My PDBs always have this size for stream 11. Not sure why.
llvm-svn: 273504
|
| |
|
|
|
|
|
| |
Tweak the big-types.ll test case to catch this bug. We just need an
enumerator name that doesn't have a length that is a multiple of 4.
llvm-svn: 273477
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The basic structure is that once a list record goes over 64K, the last
subrecord of the list is an LF_INDEX record that refers to the next
record. Because the type record graph must be toplogically sorted, this
means we have to emit them in reverse order. We build the type record in
order of declaration, so this means that if we don't want extra copies,
we need to detect when we were about to split a record, and leave space
for a continuation subrecord that will point to the eventual split
top-level record.
Also adds dumping support for these records.
Next we should make sure that large method overload lists work properly.
llvm-svn: 273294
|
| |
|
|
|
|
|
| |
This patch adds a function that corresponds to `fUDTAnon`
and use that to compute TPI hash values as the reference does.
llvm-svn: 273139
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This seems like the least intrusive way to pass this information
through.
Fixes PR28151
Reviewers: majnemer, aprantl, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21444
llvm-svn: 273053
|
| |
|
|
|
|
|
|
| |
64-bit PDBs never have FPO data. They have xdata instead.
Also improve error recovery of stream summary dumping while I'm here.
llvm-svn: 273046
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21393
llvm-svn: 272930
|
| |
|
|
|
|
|
| |
There was a regression introduced during type stream merging when
visiting a field list record. This has been fixed in this patch.
llvm-svn: 272929
|
| |
|
|
|
|
|
|
| |
This reverts commit fb0dd311e1ad945827b8ffd5354f4810e2be1579.
This breaks some llvm-readobj tests.
llvm-svn: 272927
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows better catching of compiler errors since we can use
the override keyword to verify that methods are actually
overridden.
Also in this patch I've changed from storing a boolean Error
code everywhere to returning an llvm::Error, to propagate richer
error information up the call stack.
Reviewed By: ruiu, rnk
Differential Revision: http://reviews.llvm.org/D21410
llvm-svn: 272926
|
| |
|
|
|
|
|
|
|
| |
Both parameters to visitTypeBegin are actually members of CVRecord,
so we can just pass CVRecord instead of destructuring it.
Differential Revision: http://reviews.llvm.org/D21435
llvm-svn: 272899
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21433
llvm-svn: 272898
|
| |
|
|
| |
llvm-svn: 272894
|
| |
|
|
| |
llvm-svn: 272889
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21418
llvm-svn: 272888
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21406
llvm-svn: 272843
|
| |
|
|
| |
llvm-svn: 272830
|
| |
|
|
|
|
| |
They aren't performance critical and don't need to be inline.
llvm-svn: 272829
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21361
llvm-svn: 272815
|
| |
|
|
| |
llvm-svn: 272728
|
| |
|
|
|
|
|
| |
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21220
llvm-svn: 272708
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 879139e1c6577b09df52de56a6bab856a19ed185.
This was committed accidentally when I blindly typed git svn
dcommit instead of the command to generate a patch.
llvm-svn: 272693
|