This lines up with other parts of the codebase that only use special
knowledge about allocator functions if they're builtins.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
I don't really think so. It shows up much later in the work when we start futzing with clang to move operator::new over to attributes from the hard-coded list, but it's really mostly transitional IMO because once everything is wired up in clang I think we'll be able to jettison the nobuiltin hack on those functions anyway.
Basically this is for symmetry with the other allocation function checks in MemoryBuiltins, wherein if a function is marked nobuiltin and the call isn't overriding that with builtin, we pretend we don't know anything. That's a hack so we don't elide non-elidable operator::new calls (we can elide generated ones, but not explicit ones, or something like that - it's a little past my ability to parse the C++ standard bits there), and I think the end result of the attributes work I'm doing will be to dump that hack.
Does that make you feel enough better? Want any of this in the commit message?