clang 20.0.0git
Classes | Namespaces | Typedefs | Enumerations | Functions
CrossTranslationUnit.h File Reference
#include "clang/AST/ASTImporterSharedState.h"
#include "clang/Analysis/MacroExpansionContext.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"
#include <optional>

Go to the source code of this file.

Classes

class  clang::cross_tu::IndexError
 
class  clang::cross_tu::CrossTranslationUnitContext
 This class is used for tools that requires cross translation unit capability. More...
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::cross_tu
 

Typedefs

using clang::cross_tu::InvocationListTy = llvm::StringMap< llvm::SmallVector< std::string, 32 > >
 

Enumerations

enum class  clang::cross_tu::index_error_code {
  clang::cross_tu::success = 0 , clang::cross_tu::unspecified = 1 , clang::cross_tu::missing_index_file , clang::cross_tu::invalid_index_format ,
  clang::cross_tu::multiple_definitions , clang::cross_tu::missing_definition , clang::cross_tu::failed_import , clang::cross_tu::failed_to_get_external_ast ,
  clang::cross_tu::failed_to_generate_usr , clang::cross_tu::triple_mismatch , clang::cross_tu::lang_mismatch , clang::cross_tu::lang_dialect_mismatch ,
  clang::cross_tu::load_threshold_reached , clang::cross_tu::invocation_list_ambiguous , clang::cross_tu::invocation_list_file_not_found , clang::cross_tu::invocation_list_empty ,
  clang::cross_tu::invocation_list_wrong_format , clang::cross_tu::invocation_list_lookup_unsuccessful
}
 

Functions

llvm::Expected< llvm::StringMap< std::string > > clang::cross_tu::parseCrossTUIndex (StringRef IndexPath)
 This function parses an index file that determines which translation unit contains which definition.
 
std::string clang::cross_tu::createCrossTUIndexString (const llvm::StringMap< std::string > &Index)
 
llvm::Expected< InvocationListTy > clang::cross_tu::parseInvocationList (StringRef FileContent, llvm::sys::path::Style PathStyle=llvm::sys::path::Style::posix)
 Parse the YAML formatted invocation list file content FileContent.
 
bool clang::cross_tu::shouldImport (const VarDecl *VD, const ASTContext &ACtx)
 Returns true if it makes sense to import a foreign variable definition.