clang  6.0.0svn
Macros | Functions
ItaniumMangle.cpp File Reference
#include "clang/AST/Mangle.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/ABI.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "clang/AST/TypeNodes.def"
#include "clang/AST/BuiltinTypes.def"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/AST/StmtNodes.inc"
Include dependency graph for ItaniumMangle.cpp:

Go to the source code of this file.

Macros

#define MANGLE_CHECKER   0
 
#define ABSTRACT_TYPE(CLASS, PARENT)
 
#define NON_CANONICAL_TYPE(CLASS, PARENT)
 
#define TYPE(CLASS, PARENT)   void mangleType(const CLASS##Type *T);
 
#define ABSTRACT_TYPE(CLASS, PARENT)
 
#define NON_CANONICAL_TYPE(CLASS, PARENT)
 
#define TYPE(CLASS, PARENT)
 
#define BUILTIN_TYPE(Id, SingletonId)
 
#define PLACEHOLDER_TYPE(Id, SingletonId)   case BuiltinType::Id:
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
 
#define ABSTRACT_STMT(Type)
 
#define EXPR(Type, Base)
 
#define STMT(Type, Base)   case Expr::Type##Class:
 

Functions

static const DeclContextIgnoreLinkageSpecDecls (const DeclContext *DC)
 
static bool isStd (const NamespaceDecl *NS)
 Return whether a given namespace is the 'std' namespace. More...
 
static bool isStdNamespace (const DeclContext *DC)
 
static const TemplateDeclisTemplate (const NamedDecl *ND, const TemplateArgumentList *&TemplateArgs)
 
static bool isTypeSubstitutable (Qualifiers Quals, const Type *Ty)
 
static StringRef mangleAArch64VectorBase (const BuiltinType *EltType)
 
static bool isParenthesizedADLCallee (const CallExpr *call)
 Look at the callee of the given call expression and determine if it's a parenthesized id-expression which would have triggered ADL otherwise. More...
 
static bool hasMangledSubstitutionQualifiers (QualType T)
 Determine whether the given type has any qualifiers that are relevant for substitutions. More...
 
static bool isCharType (QualType T)
 
static bool isCharSpecialization (QualType T, const char *Name)
 Returns whether a given type is a template specialization of a given name with a single argument of type char. More...
 
template<std::size_t StrLen>
static bool isStreamCharSpecialization (const ClassTemplateSpecializationDecl *SD, const char(&Str)[StrLen])
 

Macro Definition Documentation

◆ ABSTRACT_STMT

#define ABSTRACT_STMT (   Type)

◆ ABSTRACT_TYPE [1/2]

#define ABSTRACT_TYPE (   CLASS,
  PARENT 
)

Definition at line 529 of file ItaniumMangle.cpp.

◆ ABSTRACT_TYPE [2/2]

#define ABSTRACT_TYPE (   CLASS,
  PARENT 
)

Definition at line 529 of file ItaniumMangle.cpp.

◆ BUILTIN_TYPE

#define BUILTIN_TYPE (   Id,
  SingletonId 
)

◆ EXPR

#define EXPR (   Type,
  Base 
)

◆ IMAGE_TYPE

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)
Value:
type_name = "ocl_" #ImgType "_" #Suffix; \
Out << type_name.size() << type_name; \
break;
int Id
Definition: ASTDiff.cpp:191

◆ MANGLE_CHECKER

#define MANGLE_CHECKER   0

Definition at line 36 of file ItaniumMangle.cpp.

◆ NON_CANONICAL_TYPE [1/2]

#define NON_CANONICAL_TYPE (   CLASS,
  PARENT 
)

Definition at line 530 of file ItaniumMangle.cpp.

◆ NON_CANONICAL_TYPE [2/2]

#define NON_CANONICAL_TYPE (   CLASS,
  PARENT 
)
Value:
case Type::CLASS: \
llvm_unreachable("can't mangle non-canonical type " #CLASS "Type"); \
return;

Definition at line 530 of file ItaniumMangle.cpp.

◆ PLACEHOLDER_TYPE

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

◆ STMT

#define STMT (   Type,
  Base 
)    case Expr::Type##Class:

◆ TYPE [1/2]

#define TYPE (   CLASS,
  PARENT 
)    void mangleType(const CLASS##Type *T);

Definition at line 531 of file ItaniumMangle.cpp.

◆ TYPE [2/2]

#define TYPE (   CLASS,
  PARENT 
)
Value:
case Type::CLASS: \
mangleType(static_cast<const CLASS##Type*>(ty)); \
break;

Definition at line 531 of file ItaniumMangle.cpp.

Function Documentation

◆ hasMangledSubstitutionQualifiers()

static bool hasMangledSubstitutionQualifiers ( QualType  T)
static

◆ IgnoreLinkageSpecDecls()

static const DeclContext* IgnoreLinkageSpecDecls ( const DeclContext DC)
static

Definition at line 762 of file ItaniumMangle.cpp.

Referenced by isStd(), and isTemplate().

◆ isCharSpecialization()

static bool isCharSpecialization ( QualType  T,
const char *  Name 
)
static

◆ isCharType()

static bool isCharType ( QualType  T)
static

◆ isParenthesizedADLCallee()

static bool isParenthesizedADLCallee ( const CallExpr call)
static

Look at the callee of the given call expression and determine if it's a parenthesized id-expression which would have triggered ADL otherwise.

Definition at line 3346 of file ItaniumMangle.cpp.

References clang::OverloadExpr::decls_begin(), clang::CallExpr::getCallee(), clang::OverloadExpr::getNumDecls(), clang::OverloadExpr::getQualifier(), clang::Expr::IgnoreParens(), and clang::UnresolvedLookupExpr::requiresADL().

◆ isStd()

static bool isStd ( const NamespaceDecl NS)
static

Return whether a given namespace is the 'std' namespace.

Definition at line 771 of file ItaniumMangle.cpp.

References clang::NamedDecl::getIdentifier(), clang::NamespaceDecl::getOriginalNamespace(), IgnoreLinkageSpecDecls(), and clang::IdentifierInfo::isStr().

Referenced by isStdNamespace(), and isStreamCharSpecialization().

◆ isStdNamespace()

static bool isStdNamespace ( const DeclContext DC)
static

◆ isStreamCharSpecialization()

template<std::size_t StrLen>
static bool isStreamCharSpecialization ( const ClassTemplateSpecializationDecl SD,
const char(&)  Str[StrLen] 
)
static

◆ isTemplate()

static const TemplateDecl* isTemplate ( const NamedDecl ND,
const TemplateArgumentList *&  TemplateArgs 
)
static

◆ isTypeSubstitutable()

static bool isTypeSubstitutable ( Qualifiers  Quals,
const Type Ty 
)
static

◆ mangleAArch64VectorBase()

static StringRef mangleAArch64VectorBase ( const BuiltinType EltType)
static

Definition at line 2970 of file ItaniumMangle.cpp.

References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecPixel, clang::ETK_Class, clang::ETK_Enum, clang::ETK_Interface, clang::ETK_None, clang::ETK_Struct, clang::ETK_Typename, clang::ETK_Union, clang::TemplateSpecializationType::getArgs(), clang::DependentTemplateSpecializationType::getArgs(), clang::TemplateName::getAsTemplateDecl(), clang::ObjCObjectType::getBaseType(), clang::ObjCInterfaceType::getDecl(), clang::DependentSizedExtVectorType::getElementType(), clang::VectorType::getElementType(), clang::NamedDecl::getIdentifier(), clang::DependentNameType::getIdentifier(), clang::DependentTemplateSpecializationType::getIdentifier(), clang::InjectedClassNameType::getInjectedSpecializationType(), clang::TypeWithKeyword::getKeyword(), clang::BuiltinType::getKind(), clang::TemplateSpecializationType::getNumArgs(), clang::DependentTemplateSpecializationType::getNumArgs(), clang::VectorType::getNumElements(), clang::PackExpansionType::getPattern(), clang::BlockPointerType::getPointeeType(), clang::DependentAddressSpaceType::getPointeeType(), clang::DependentNameType::getQualifier(), clang::DependentTemplateSpecializationType::getQualifier(), clang::DependentSizedExtVectorType::getSizeExpr(), clang::TemplateSpecializationType::getTemplateName(), clang::ObjCObjectType::getTypeArgs(), clang::VectorType::getVectorKind(), clang::Type::isBuiltinType(), clang::ObjCObjectType::isKindOfType(), clang::ObjCObjectType::isSpecialized(), clang::VectorType::NeonPolyVector, clang::VectorType::NeonVector, clang::ObjCProtocolQualifiers< T >::qual_empty(), clang::SplitQualType::Quals, clang::ObjCProtocolQualifiers< T >::quals(), clang::QualType::split(), and clang::SplitQualType::Ty.