This is an archive of the discontinued LLVM Phabricator instance.

Cleanups in IdentifierInfo following the removal of PTH
ClosedPublic

Authored by riccibruno on Nov 23 2018, 1:52 PM.

Details

Summary

Conditional on D54547: PTH-- Remove feature entirely-

The Entry pointer in IdentifierInfo was only null for IdentifierInfos
created from a PTH. Now that PTH support has been removed we can remove
some PTH specific code in IdentifierInfo::getLength and IdentifierInfo::getNameStart.

Also make the constructor of IdentifierInfo private to make sure that they
are only created by IdentifierTable, and move it to the header so that it
can be inlined in IdentifierTable::get and IdentifierTable::getOwn.

Diff Detail

Repository
rC Clang

Event Timeline

riccibruno created this revision.Nov 23 2018, 1:52 PM

This looks right to me. Note the PTH removal is still waiting approval.

include/clang/Basic/IdentifierTable.h
119

Instead of putting these in an initializer, can you default-init each of them inline, then make this =default?

riccibruno marked an inline comment as done.Nov 26 2018, 6:22 AM
riccibruno added inline comments.
include/clang/Basic/IdentifierTable.h
119

Nope, you cannot default-init bit-fields (at least not until c++20)

erichkeane added inline comments.Nov 26 2018, 6:29 AM
include/clang/Basic/IdentifierTable.h
119

Ugg, you're right. I hate bitfields.

riccibruno marked an inline comment as done.Nov 26 2018, 6:30 AM
riccibruno added inline comments.
include/clang/Basic/IdentifierTable.h
119

Happy monday morning :)

riccibruno marked 2 inline comments as done.Nov 26 2018, 6:43 AM

Can this go in now that D54547 has been committed ?

erichkeane accepted this revision.Dec 4 2018, 2:10 PM
This revision is now accepted and ready to land.Dec 4 2018, 2:10 PM
This revision was automatically updated to reflect the committed changes.