[PATCH] D108458: [clang][CodeGen] Add default constructor for Address. NFC.

2021-08-23 Thread Andy Wingo via Phabricator via cfe-commits
wingo abandoned this revision. wingo added a comment. In D108458#2957789 , @rjmccall wrote: > You can still use a type without a default constructor in a `DenseMap`; you > just have to use `insert` instead of `dict[key] = ...`. Aaaah, thanks for this no

[PATCH] D108458: [clang][CodeGen] Add default constructor for Address. NFC.

2021-08-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. You can still use a type without a default constructor in a `DenseMap`; you just have to use `insert` instead of `dict[key] = ...`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108458/new/ https://reviews.llvm.org/D10845

[PATCH] D108458: [clang][CodeGen] Add default constructor for Address. NFC.

2021-08-20 Thread Andy Wingo via Phabricator via cfe-commits
wingo added inline comments. Comment at: clang/lib/CodeGen/Address.h:31 : Pointer(pointer), Alignment(alignment) { assert((!alignment.isZero() || pointer == nullptr) && "creating valid address with invalid alignment"); It would be nice to

[PATCH] D108458: [clang][CodeGen] Add default constructor for Address. NFC.

2021-08-20 Thread Andy Wingo via Phabricator via cfe-commits
wingo created this revision. wingo added a reviewer: rjmccall. wingo requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows a declaration of an Address to be invalid by default, allowing it to be added to e.g. a DenseMap. Will followu