<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/lldb/source/Plugins/SymbolFile/NativePDB, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2020-01-02T10:54:45+00:00</updated>
<entry>
<title>[lldb][NFC] Create type-safe function for creating a CompilerType from a QualType</title>
<updated>2020-01-02T10:54:45+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-30T20:20:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=fe8e25a48a2a0f8f508499ba950181dba3d600b0'/>
<id>urn:sha1:fe8e25a48a2a0f8f508499ba950181dba3d600b0</id>
<content type='text'>
LLDB frequently converts QualType to CompilerType. This is currently done like this:
    result = CompilerType(this, qual_type_var.getAsOpaquePtr())
There are a few shortcomings in this current approach:
  1. CompilerType's constructor takes a void* pointer so it isn't type safe.
  2. We can't add any sanity checks to the CompilerType constructor (e.g. that the type
     actually belongs to the passed ClangASTContext) without expanding the TypeSystem API.
  3. The logic for converting QualType-&gt;CompilerType is spread out over all of LLDB so
     changing it is difficult (e.g., what if we want to just pass the type ptr and not the
     1type_ptr | qual_flags1 to CompilerType).

This patch adds a `ClangASTContext::GetType` function similar to the other GetTypeForDecl
functions that does this conversion in a type safe way.

It also adds a sanity check for Tag-based types that the type actually belongs to the
current ClangASTContext (Types don't seem to know their ASTContext, so we have to
workaround by looking at the decl for the underlying TagDecl. This doesn't cover all types
we construct but it's better than no sanity check).
</content>
</entry>
<entry>
<title>[lldb][NFC] Make CompilerDeclContext construction type safe</title>
<updated>2019-12-23T08:56:54+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-23T08:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=42ec584a8b4e604360b7a4d45a65c570d58b1bf9'/>
<id>urn:sha1:42ec584a8b4e604360b7a4d45a65c570d58b1bf9</id>
<content type='text'>
The CompilerDeclContext constructor takes a void* pointer which
means that all callers of this constructor need to first explicitly
convert all pointers to clang::DeclContext*. This causes that we
for example can't just pass a TranslationUnitDecl* to the constructor without
first casting it to its parent class (as it inherits from both
Decl and DeclContext so the void* pointer is actually a Decl*).

This patch introduces a utility function in the ClangASTContext
which gets rid of the requirement to cast all pointers to
clang::DeclContext. Also moves all constructor calls to use this
function instead which is NFC (beside the change in
DWARFASTParserClangTests.cpp).
</content>
</entry>
<entry>
<title>[lldb][NFC] Return a reference from ClangASTContext::getASTContext and remove dead nullptr checks</title>
<updated>2019-12-21T21:51:35+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-21T21:40:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=f9f49d3594bc7584cc5cb96125ca08f2ad97662c'/>
<id>urn:sha1:f9f49d3594bc7584cc5cb96125ca08f2ad97662c</id>
<content type='text'>
ClangASTContext::getASTContext() currently returns a ptr but we have an assert there since a
while that the ASTContext is not a nullptr. This causes that we still have a lot of code
that is doing nullptr checks on the result of getASTContext() which is all unreachable code.

This patch changes the return value to a reference to make it clear this can't be a nullptr
and deletes all the nullptr checks.
</content>
</entry>
<entry>
<title>[lldb][NFC] Use StringRef in CreateRecordType and CreateObjCClass</title>
<updated>2019-12-17T15:10:34+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-17T15:00:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=268f37df6e45c4b0603bd4d964483a0d84da44c1'/>
<id>urn:sha1:268f37df6e45c4b0603bd4d964483a0d84da44c1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[lldb][NFC] Rename ClangASTImporter::InsertRecordDecl to SetRecordLayout and document it</title>
<updated>2019-12-17T14:56:07+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-17T13:34:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b852b3c982d2e8ad3f13c626b3e3655e5b3c399e'/>
<id>urn:sha1:b852b3c982d2e8ad3f13c626b3e3655e5b3c399e</id>
<content type='text'>
This function is just setting the layout for the given RecordDecl so
the current name is not very descriptive. Also add some documentation for it.
</content>
</entry>
<entry>
<title>[lldb][NFC] Remove all unnecessary includes for ClangASTSourceCommon.h</title>
<updated>2019-12-17T10:21:11+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2019-12-17T10:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d9ca412a8a75ab64af33a9e95d1319c4dd2004d2'/>
<id>urn:sha1:d9ca412a8a75ab64af33a9e95d1319c4dd2004d2</id>
<content type='text'>
These files only need the definition of ClangASTMetadata (which was
previously in the ClangASTSourceCommon.h) or don't need the include at all.
</content>
</entry>
<entry>
<title>[lldb] Don't put compile unit name into the support file list and support DWARF5 line tables</title>
<updated>2019-12-05T10:37:18+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2019-11-28T09:19:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=57f8a998ceaf36e021878e8810bb57a00452c07d'/>
<id>urn:sha1:57f8a998ceaf36e021878e8810bb57a00452c07d</id>
<content type='text'>
Summary:
Lldb's "format-independent" debug info made use of the fact that DWARF
(&lt;=4) did not use the file index zero, and reused the support file index
zero for storing the compile unit name.

While this provided some convenience for DWARF&lt;=4, it meant that the PDB
plugin needed to artificially remap file indices in order to free up
index 0. Furthermore, DWARF v5 make file index 0 legal, which meant that
similar remapping would be needed in the dwarf plugin too.

What this patch does instead is remove the requirement of having the
compile unit name in the index 0. It is not that useful since the name
can always be fetched from the CompileUnit object. Remapping code in the
pdb plugin(s) has been removed or simplified.

DWARF plugin has started inserting an empty FileSpec at index 0 to
ensure the indices keep matching up (in case of DWARF&lt;=4). For DWARF5,
we insert the file 0 from the line table.

I add a test to ensure we can correctly lookup line table entries
referencing file 0, and in particular the case where the file 0 is also
duplicated in another file entry, as this is how clang produces line
tables in some circumstances (see pr44170). Though this is probably a
bug in clang, this is not forbidden by DWARF, and lldb already has
support for that in some (but not all) cases -- this adds a test for the
code path which was not fixed in this patch.

Reviewers: clayborg, JDevlieghere, jdoerfert

Subscribers: aprantl, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70954
</content>
</entry>
<entry>
<title>Replace bitfield in lldb::Type with byte-sized members. (NFC)</title>
<updated>2019-11-18T18:00:26+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2019-11-18T17:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d4f18f11d372bd02127424ae6a8f8a30f77a0426'/>
<id>urn:sha1:d4f18f11d372bd02127424ae6a8f8a30f77a0426</id>
<content type='text'>
Due to alginment and packing using separate members takes up the same
amount of space, but makes it far less cumbersome to deal with it in
constructors etc.
</content>
</entry>
<entry>
<title>Add RTTI support to the SymbolFile class hierarchy</title>
<updated>2019-11-15T19:52:13+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2019-11-15T18:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=7d71dd928d1dcc838dc4dbe5cf294f557609f271'/>
<id>urn:sha1:7d71dd928d1dcc838dc4dbe5cf294f557609f271</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D70322
</content>
</entry>
<entry>
<title>Performance: Add a set of visited SymbolFiles to the other FindFiles variant.</title>
<updated>2019-11-12T17:38:37+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2019-11-12T17:25:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=3b73dcdc9656e156c4380454150b8986c5b9aad1'/>
<id>urn:sha1:3b73dcdc9656e156c4380454150b8986c5b9aad1</id>
<content type='text'>
This is basically the same bug as in r260434.

SymbolFileDWARF::FindTypes has exponential worst-case when digging
through dependency DAG of .pcm files because each object file and .pcm
file may depend on an already-visited .pcm file, which may again have
dependencies. Fixed here by carrying a set of already visited
SymbolFiles around.

rdar://problem/56993424

Differential Revision: https://reviews.llvm.org/D70106
</content>
</entry>
</feed>
