14#ifndef LLVM_CLANG_LIB_SCALABLESTATICANALYSISFRAMEWORK_CORE_SERIALIZATION_JSONFORMAT_JSONFORMATIMPL_H
15#define LLVM_CLANG_LIB_SCALABLESTATICANALYSISFRAMEWORK_CORE_SERIALIZATION_JSONFORMAT_JSONFORMATIMPL_H
25#include "llvm/ADT/STLExtras.h"
26#include "llvm/ADT/StringExtras.h"
27#include "llvm/Support/ErrorHandling.h"
28#include "llvm/Support/FileSystem.h"
29#include "llvm/Support/FormatVariadic.h"
30#include "llvm/Support/JSON.h"
31#include "llvm/Support/MemoryBuffer.h"
32#include "llvm/Support/Path.h"
33#include "llvm/Support/Registry.h"
54 "failed to read file '{0}': {1}";
56 "failed to write file '{0}': {1}";
59 "path is a directory, not a file";
61 "file does not end with '{0}' extension";
62inline constexpr const char *
FileExists =
"file already exists";
64 "parent directory does not exist";
71inline constexpr const char *
WritingToFile =
"writing {0} to file '{1}'";
74 "failed to insert {0} at index '{1}': encountered duplicate '{2}'";
77 "failed to read {0}: expected JSON {1}";
79 "failed to read {0} from field '{1}': expected JSON {2}";
81 "failed to read {0} from index '{1}': expected JSON {2}";
84 "failed to deserialize EntitySummary: no FormatInfo registered for '{0}'";
86 "failed to serialize EntitySummary: no FormatInfo registered for '{0}'";
89 "failed to deserialize EntitySummary: null EntitySummary data for '{0}'";
91 "JSONFormat - null EntitySummary data for '{0}'";
93inline constexpr const char
95 "failed to deserialize EntitySummary: EntitySummary data for '{0}' "
96 "reports mismatched '{1}'";
97inline constexpr const char
99 "JSONFormat - EntitySummary data for '{0}' reports mismatched '{1}'";
102 "invalid BuildNamespaceKind value '{0}' for field 'kind'";
105 "invalid EntityLinkageType value '{0}' for field 'type'";
108 "failed to deserialize LinkageTable: extra '{0}' not present in IdTable";
111 "failed to deserialize LinkageTable: missing '{0}' present in IdTable";
114 "failed to read EntityId: expected JSON object with a single '{0}' key "
115 "mapped to a number (unsigned 64-bit integer)";
118 "failed to patch EntityId: '{0}' not found in entity resolution table";
Uniquely identifies a whole-program analysis and the AnalysisResult it produces.
Uniquely identifies an analysis summary.
constexpr const char * FailedToSerializeEntitySummaryMismatchedSummaryName
constexpr const char * FailedToPatchEntityIdNotInTable
constexpr const char * InvalidBuildNamespaceKind
constexpr const char * ReadingFromFile
constexpr const char * ReadingFromField
constexpr const char * FailedToReadObjectAtIndex
constexpr const char * FailedToDeserializeEntitySummaryNoFormatInfo
constexpr const char * InvalidEntityLinkageType
constexpr const char * FileIsDirectory
constexpr const char * FailedToDeserializeEntitySummaryMismatchedSummaryName
constexpr const char * FileNotFound
constexpr const char * FailedToReadObjectAtField
constexpr const char * FileExists
constexpr const char * FailedToReadEntityIdObject
constexpr const char * WritingToFile
constexpr const char * ReadingFromIndex
constexpr const char * WritingToField
constexpr const char * FailedInsertionOnDuplication
constexpr const char * FailedToDeserializeLinkageTableExtraId
constexpr const char * FailedToSerializeEntitySummaryMissingData
constexpr const char * FailedToDeserializeEntitySummaryMissingData
constexpr const char * FailedToWriteFile
constexpr const char * FailedToDeserializeLinkageTableMissingId
constexpr const char * FileIsNotJSON
constexpr const char * FailedToReadFile
constexpr const char * FailedToReadObject
constexpr const char * ParentDirectoryNotFound
constexpr const char * FailedToSerializeEntitySummaryNoFormatInfo
constexpr const char * WritingToIndex
SummaryName summaryNameFromJSON(llvm::StringRef SummaryNameStr)
llvm::StringRef summaryNameToJSON(const SummaryName &SN)
llvm::Expected< EntityLinkageType > entityLinkageTypeFromJSON(llvm::StringRef EntityLinkageTypeStr)
constexpr const char * JSONEntityIdKey
An entity ID is encoded as the single-key object {"@": <index>}.
llvm::StringRef analysisNameToJSON(const AnalysisName &AN)
AnalysisName analysisNameFromJSON(llvm::StringRef AnalysisNameStr)
llvm::Expected< BuildNamespaceKind > buildNamespaceKindFromJSON(llvm::StringRef BuildNamespaceKindStr)
llvm::json::Object Object
llvm::Expected< Value > readJSON(llvm::StringRef Path)
constexpr const char * JSONFormatFileExtension
llvm::StringRef buildNamespaceKindToJSON(BuildNamespaceKind BNK)
llvm::StringRef entityLinkageTypeToJSON(EntityLinkageType LT)
llvm::Error writeJSON(Value &&V, llvm::StringRef Path)