Use cached source files.

This commit is contained in:
Bartosz Taudul
2020-05-23 15:14:57 +02:00
parent d470202bca
commit ee22cf3b0c
5 changed files with 59 additions and 43 deletions

View File

@@ -4,8 +4,9 @@
namespace tracy
{
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view )
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view, const Worker& worker )
{
if( worker.GetSourceFileFromCache( fn ).data != nullptr ) return true;
struct stat buf;
if( stat( view.SourceSubstitution( fn ), &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
{