[all-commits] [llvm/llvm-project] 2005f4: [clang][NFC] Refactor `Selector` to use `PointerIn...
Vlad Serebrennikov via All-commits
all-commits at lists.llvm.org
Wed Oct 25 06:38:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2005f484f6c021318848cffda2c3d97c58615bb5
https://github.com/llvm/llvm-project/commit/2005f484f6c021318848cffda2c3d97c58615bb5
Author: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: 2023-10-25 (Wed, 25 Oct 2023)
Changed paths:
M clang/include/clang/AST/DeclarationName.h
M clang/include/clang/Basic/IdentifierTable.h
M clang/lib/Basic/IdentifierTable.cpp
Log Message:
-----------
[clang][NFC] Refactor `Selector` to use `PointerIntPair` inside (#69916)
Refactor `uintptr_t` inside of `clang::Selector` that holds a pointer to `IdentifierInfo` or `MultiKeywordSelector` and `IdentifierInfoFlag` enum into `PointerIntPair`. This is a part of `PointerIntPair` migration outlined in https://github.com/llvm/llvm-project/issues/69835.
Unlike `uintpt_t`, `PointerIntPair` required pointee types to be complete, so I had to shuffle definitions of `MultiKeywordSelector` and `detail::DeclarationNameExtra` around to make them complete at `Selector`. Also, there were outdated specializations of `PointerLikeTypeTraits` for `IdentifierInfo *`, which are no longer needed, because `alignof` that primary template use works just fine. Not just that, but they declared that `IdentifierInfo *` has only 1 spare lower bit, but today they are 8-byte aligned.
More information about the All-commits
mailing list