clang 20.0.0git
Macros | Functions
USRGeneration.cpp File Reference
#include "clang/Index/USRGeneration.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/ODRHash.h"
#include "clang/Basic/FileManager.h"
#include "clang/Lex/PreprocessingRecord.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/AArch64SVEACLETypes.def"
#include "clang/Basic/PPCTypes.def"
#include "clang/Basic/RISCVVTypes.def"
#include "clang/Basic/WebAssemblyReferenceTypes.def"
#include "clang/Basic/AMDGPUTypes.def"
#include "clang/Basic/HLSLIntangibleTypes.def"
#include "clang/AST/BuiltinTypes.def"

Go to the source code of this file.

Macros

#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
 
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)
 
#define SVE_TYPE(Name, Id, SingletonId)
 
#define PPC_VECTOR_TYPE(Name, Id, Size)
 
#define RVV_TYPE(Name, Id, SingletonId)
 
#define WASM_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define AMDGPU_TYPE(Name, Id, SingletonId)
 
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)
 
#define BUILTIN_TYPE(Id, SingletonId)
 
#define PLACEHOLDER_TYPE(Id, SingletonId)   case BuiltinType::Id:
 

Functions

static bool printLoc (llvm::raw_ostream &OS, SourceLocation Loc, const SourceManager &SM, bool IncludeOffset)
 
static StringRef GetExternalSourceContainer (const NamedDecl *D)
 
static const ObjCCategoryDeclgetCategoryContext (const NamedDecl *D)
 
static void printQualifier (llvm::raw_ostream &Out, ASTContext &Ctx, NestedNameSpecifier *NNS)
 
static void combineClassAndCategoryExtContainers (StringRef ClsSymDefinedIn, StringRef CatSymDefinedIn, raw_ostream &OS)
 

Macro Definition Documentation

◆ AMDGPU_TYPE

#define AMDGPU_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
Out << "@BT@" << #Name; \
break;

◆ BUILTIN_TYPE

#define BUILTIN_TYPE (   Id,
  SingletonId 
)

◆ EXT_OPAQUE_TYPE

#define EXT_OPAQUE_TYPE (   ExtType,
  Id,
  Ext 
)
Value:
case BuiltinType::Id: \
Out << "@BT@" << #ExtType; break;

◆ HLSL_INTANGIBLE_TYPE

#define HLSL_INTANGIBLE_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
Out << "@BT@" << #Name; \
break;

◆ IMAGE_TYPE

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)
Value:
case BuiltinType::Id: \
Out << "@BT@" << #Suffix << "_" << #ImgType; break;

◆ PLACEHOLDER_TYPE

#define PLACEHOLDER_TYPE (   Id,
  SingletonId 
)    case BuiltinType::Id:

◆ PPC_VECTOR_TYPE

#define PPC_VECTOR_TYPE (   Name,
  Id,
  Size 
)
Value:
case BuiltinType::Id: \
Out << "@BT@" << #Name; break;

◆ RVV_TYPE

#define RVV_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
Out << "@BT@" << Name; break;

◆ SVE_TYPE

#define SVE_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
Out << "@BT@" << Name; break;

◆ WASM_TYPE

#define WASM_TYPE (   Name,
  Id,
  SingletonId 
)    case BuiltinType::Id:

Function Documentation

◆ combineClassAndCategoryExtContainers()

static void combineClassAndCategoryExtContainers ( StringRef  ClsSymDefinedIn,
StringRef  CatSymDefinedIn,
raw_ostream &  OS 
)
static

◆ getCategoryContext()

static const ObjCCategoryDecl * getCategoryContext ( const NamedDecl D)
static

Definition at line 408 of file USRGeneration.cpp.

References D, and clang::Decl::getDeclContext().

◆ GetExternalSourceContainer()

static StringRef GetExternalSourceContainer ( const NamedDecl D)
static

◆ printLoc()

static bool printLoc ( llvm::raw_ostream &  OS,
SourceLocation  Loc,
const SourceManager SM,
bool  IncludeOffset 
)
static
Returns
true on error.

Definition at line 29 of file USRGeneration.cpp.

References clang::FileEntryRef::getName(), clang::SourceLocation::isInvalid(), Loc, and SM.

Referenced by clang::index::generateUSRForMacro().

◆ printQualifier()

static void printQualifier ( llvm::raw_ostream &  Out,
ASTContext Ctx,
NestedNameSpecifier NNS 
)
static