[CAS] Cache symbol graph outputs

The symbol graph output from a module can contain an arbitrary number of
files, depending on what extensions it contains, so cache a list of
symbol graph files with their base name and contents so that they can be
replayed.

rdar://140286819
This commit is contained in:
Ben Langmuir
2024-12-03 13:04:09 -08:00
parent ecf7ac910e
commit e7c37655e4
10 changed files with 127 additions and 10 deletions

View File

@@ -98,6 +98,7 @@ TYPE("swiftoverlay", SwiftOverlayFile, "swiftoverlay", "")
// Misc types
TYPE("pcm", ClangModuleFile, "pcm", "")
TYPE("symbol-graph", SymbolGraphFile, "symbols.json", "")
TYPE("pch", PCH, "pch", "")
TYPE("none", Nothing, "", "")

View File

@@ -46,6 +46,7 @@ public:
llvm::cas::ActionCache &Cache,
llvm::cas::ObjectRef BaseKey,
const FrontendInputsAndOutputs &InputsAndOutputs,
const FrontendOptions &Opts,
FrontendOptions::ActionType Action);
~SwiftCASOutputBackend();

View File

@@ -36,7 +36,7 @@ createSwiftCachingOutputBackend(
llvm::cas::ObjectStore &CAS, llvm::cas::ActionCache &Cache,
llvm::cas::ObjectRef BaseKey,
const FrontendInputsAndOutputs &InputsAndOutputs,
FrontendOptions::ActionType Action);
const FrontendOptions &Opts, FrontendOptions::ActionType Action);
/// Replay the output of the compilation from cache.
/// Return true if outputs are replayed, false otherwise.