From 8ec5b3e6ef2e7e5c3adaa5accb375676b1c09ff0 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 22 Feb 2024 07:14:55 -0800 Subject: Add API for querying and reusing precompiled binary modules. (#3614) --- source/compiler-core/slang-source-loc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/compiler-core/slang-source-loc.h') diff --git a/source/compiler-core/slang-source-loc.h b/source/compiler-core/slang-source-loc.h index f432b2432..a5919d809 100644 --- a/source/compiler-core/slang-source-loc.h +++ b/source/compiler-core/slang-source-loc.h @@ -6,6 +6,7 @@ #include "../core/slang-memory-arena.h" #include "../core/slang-string-slice-pool.h" #include "../core/slang-castable.h" +#include "../core/slang-crypto.h" #include "slang-source-map.h" @@ -277,6 +278,8 @@ public: /// Dtor ~SourceFile(); + SHA1::Digest getDigest(); + protected: SourceManager* m_sourceManager; ///< The source manager this belongs to @@ -286,6 +289,8 @@ public: UnownedStringSlice m_content; ///< The actual contents of the file. size_t m_contentSize; ///< The size of the actual contents + SHA1::Digest m_digest; + // In order to speed up lookup of line number information, // we will cache the starting offset of each line break in // the input file: -- cgit v1.2.3