Skip to content
Commit 7ffd0b44 authored by David Majnemer's avatar David Majnemer
Browse files

[Lex] inferModuleFromLocation should do no work if there are no modules

getModuleContainingLocation ends up on the hot-path for typical C code
which can lead to calls to getFileIDSlow.

To speed this up, short circuit inferModuleFromLocation when there
aren't any modules, implicit or otherwise.

This shaves 4-5% build time when building the linux kernel.

llvm-svn: 269687
parent 58b794ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment