clang API Documentation
#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/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/AST/StmtNodes.inc"
Go to the source code of this file.
Defines | |
| #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 | ABSTRACT_STMT(Type) |
| #define | EXPR(Type, Base) |
| #define | STMT(Type, Base) case Expr::Type##Class: |
Functions | |
| static const DeclContext * | IgnoreLinkageSpecDecls (const DeclContext *DC) |
| static bool | isStd (const NamespaceDecl *NS) |
| isStd - Return whether a given namespace is the 'std' namespace. | |
| static bool | isStdNamespace (const DeclContext *DC) |
| static const TemplateDecl * | isTemplate (const NamedDecl *ND, const TemplateArgumentList *&TemplateArgs) |
| static const FieldDecl * | FindFirstNamedDataMember (const RecordDecl *RD) |
| static StringRef | mangleAArch64VectorBase (const BuiltinType *EltType) |
| static bool | isParenthesizedADLCallee (const CallExpr *call) |
| static bool | hasMangledSubstitutionQualifiers (QualType T) |
| Determine whether the given type has any qualifiers that are relevant for substitutions. | |
| static bool | isCharType (QualType T) |
| static bool | isCharSpecialization (QualType T, const char *Name) |
| template<std::size_t StrLen> | |
| static bool | isStreamCharSpecialization (const ClassTemplateSpecializationDecl *SD, const char(&Str)[StrLen]) |
| #define ABSTRACT_STMT | ( | Type | ) |
| #define ABSTRACT_TYPE | ( | CLASS, | |
| PARENT | |||
| ) |
Definition at line 360 of file ItaniumMangle.cpp.
| #define ABSTRACT_TYPE | ( | CLASS, | |
| PARENT | |||
| ) |
Definition at line 360 of file ItaniumMangle.cpp.
| #define BUILTIN_TYPE | ( | Id, | |
| SingletonId | |||
| ) |
| #define MANGLE_CHECKER 0 |
Definition at line 35 of file ItaniumMangle.cpp.
| #define NON_CANONICAL_TYPE | ( | CLASS, | |
| PARENT | |||
| ) |
Definition at line 361 of file ItaniumMangle.cpp.
| #define NON_CANONICAL_TYPE | ( | CLASS, | |
| PARENT | |||
| ) |
case Type::CLASS: \ llvm_unreachable("can't mangle non-canonical type " #CLASS "Type"); \ return;
Definition at line 361 of file ItaniumMangle.cpp.
| #define PLACEHOLDER_TYPE | ( | Id, | |
| SingletonId | |||
| ) | case BuiltinType::Id: |
Definition at line 362 of file ItaniumMangle.cpp.
| #define TYPE | ( | CLASS, | |
| PARENT | |||
| ) |
case Type::CLASS: \
mangleType(static_cast<const CLASS##Type*>(ty)); \
break;
Definition at line 362 of file ItaniumMangle.cpp.
| static const FieldDecl* FindFirstNamedDataMember | ( | const RecordDecl * | RD | ) | [static] |
Definition at line 1053 of file ItaniumMangle.cpp.
References clang::Type::getAs(), and clang::RecordDecl::isAnonymousStructOrUnion().
| static bool hasMangledSubstitutionQualifiers | ( | QualType | T | ) | [static] |
Determine whether the given type has any qualifiers that are relevant for substitutions.
Definition at line 3520 of file ItaniumMangle.cpp.
References clang::Qualifiers::getCVRQualifiers(), clang::QualType::getQualifiers(), and clang::Qualifiers::hasAddressSpace().
| static const DeclContext* IgnoreLinkageSpecDecls | ( | const DeclContext * | DC | ) | [static] |
Definition at line 514 of file ItaniumMangle.cpp.
Referenced by isStd().
| static bool isCharSpecialization | ( | QualType | T, |
| const char * | Name | ||
| ) | [static] |
isCharSpecialization - Returns whether a given type is a template specialization of a given name with a single argument of type char.
Definition at line 3567 of file ItaniumMangle.cpp.
References clang::Type::getAs(), clang::RecordType::getDecl(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), isCharType(), clang::QualType::isNull(), isStdNamespace(), and clang::TemplateArgumentList::size().
Referenced by isStreamCharSpecialization().
| static bool isCharType | ( | QualType | T | ) | [static] |
Definition at line 3557 of file ItaniumMangle.cpp.
References clang::QualType::isNull(), and clang::Type::isSpecificBuiltinType().
Referenced by isCharSpecialization(), and isStreamCharSpecialization().
| 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 2551 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().
| static bool isStd | ( | const NamespaceDecl * | NS | ) | [static] |
isStd - Return whether a given namespace is the 'std' namespace.
Definition at line 523 of file ItaniumMangle.cpp.
References clang::NamedDecl::getIdentifier(), clang::NamespaceDecl::getOriginalNamespace(), IgnoreLinkageSpecDecls(), and clang::IdentifierInfo::isStr().
Referenced by isStdNamespace().
| static bool isStdNamespace | ( | const DeclContext * | DC | ) | [static] |
Definition at line 534 of file ItaniumMangle.cpp.
References clang::DeclContext::isNamespace(), and isStd().
Referenced by isCharSpecialization().
| static bool isStreamCharSpecialization | ( | const ClassTemplateSpecializationDecl * | SD, |
| const char(&) | Str[StrLen] | ||
| ) | [static] |
Definition at line 3594 of file ItaniumMangle.cpp.
References clang::NamedDecl::getIdentifier(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), isCharSpecialization(), isCharType(), clang::IdentifierInfo::isStr(), and clang::TemplateArgumentList::size().
| static const TemplateDecl* isTemplate | ( | const NamedDecl * | ND, |
| const TemplateArgumentList *& | TemplateArgs | ||
| ) | [static] |
Definition at line 542 of file ItaniumMangle.cpp.
References clang::FunctionDecl::getPrimaryTemplate(), and clang::FunctionDecl::getTemplateSpecializationArgs().
Referenced by clang::Sema::isAcceptableTagRedeclaration().
| static StringRef mangleAArch64VectorBase | ( | const BuiltinType * | EltType | ) | [static] |
Definition at line 2228 of file ItaniumMangle.cpp.
References clang::BuiltinType::getKind().