Page MenuHomePhabricator

clang/Basic: Stop using SourceManager::getBuffer, NFC

Authored by dexonsmith on Wed, Oct 14, 7:41 AM.



Update clang/lib/Basic to stop relying on a MemoryBuffer*, using the
MemoryBufferRef from getBufferOrNone or getBufferOrFake instead of

Diff Detail

Event Timeline

dexonsmith created this revision.Wed, Oct 14, 7:41 AM
arphaman accepted this revision.Wed, Oct 14, 6:37 PM
This revision is now accepted and ready to land.Wed, Oct 14, 6:37 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptWed, Oct 14, 7:43 PM
nikic added a subscriber: nikic.Sun, Oct 18, 1:49 AM

FYI this showed up as a 1% compile-time regression in terms of instructions retired for O0-g builds:

Looking at the diff, it's not really obvious to me what could cause that, possibly GCC is just really bad at optimizing Optional<MemoryBufferRef>.