14#ifndef LLVM_CLANG_LIB_SCALABLESTATICANALYSISFRAMEWORK_CORE_SERIALIZATION_JSONFORMAT_JSONFORMATIMPL_H
15#define LLVM_CLANG_LIB_SCALABLESTATICANALYSISFRAMEWORK_CORE_SERIALIZATION_JSONFORMAT_JSONFORMATIMPL_H
24#include "llvm/ADT/STLExtras.h"
25#include "llvm/ADT/StringExtras.h"
26#include "llvm/Support/ErrorHandling.h"
27#include "llvm/Support/FileSystem.h"
28#include "llvm/Support/FormatVariadic.h"
29#include "llvm/Support/JSON.h"
30#include "llvm/Support/MemoryBuffer.h"
31#include "llvm/Support/Path.h"
32#include "llvm/Support/Registry.h"
53 "failed to read file '{0}': {1}";
55 "failed to write file '{0}': {1}";
58 "path is a directory, not a file";
60 "file does not end with '{0}' extension";
61inline constexpr const char *
FileExists =
"file already exists";
63 "parent directory does not exist";
70inline constexpr const char *
WritingToFile =
"writing {0} to file '{1}'";
73 "failed to insert {0} at index '{1}': encountered duplicate '{2}'";
76 "failed to read {0}: expected JSON {1}";
78 "failed to read {0} from field '{1}': expected JSON {2}";
80 "failed to read {0} from index '{1}': expected JSON {2}";
83 "failed to deserialize EntitySummary: no FormatInfo registered for '{0}'";
85 "failed to serialize EntitySummary: no FormatInfo registered for '{0}'";
88 "failed to deserialize EntitySummary: null EntitySummary data for '{0}'";
90 "JSONFormat - null EntitySummary data for '{0}'";
92inline constexpr const char
94 "failed to deserialize EntitySummary: EntitySummary data for '{0}' "
95 "reports mismatched '{1}'";
96inline constexpr const char
98 "JSONFormat - EntitySummary data for '{0}' reports mismatched '{1}'";
101 "invalid BuildNamespaceKind value '{0}' for field 'kind'";
104 "invalid EntityLinkageType value '{0}' for field 'type'";
107 "failed to deserialize LinkageTable: extra '{0}' not present in IdTable";
110 "failed to deserialize LinkageTable: missing '{0}' present in IdTable";
113 "failed to read EntityId: expected JSON object with a single '{0}' key "
114 "mapped to a number (unsigned 64-bit integer)";
117 "failed to patch EntityId: '{0}' not found in entity resolution table";
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::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)