本文整理汇总了C++中llvm::FoldingSetNodeID::AddInteger方法的典型用法代码示例。如果您正苦于以下问题:C++ FoldingSetNodeID::AddInteger方法的具体用法?C++ FoldingSetNodeID::AddInteger怎么用?C++ FoldingSetNodeID::AddInteger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llvm::FoldingSetNodeID
的用法示例。
在下文中一共展示了FoldingSetNodeID::AddInteger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProfileRegion
void AllocaRegion::ProfileRegion(llvm::FoldingSetNodeID& ID,
const Expr *Ex, unsigned cnt,
const MemRegion *) {
ID.AddInteger((unsigned) AllocaRegionKind);
ID.AddPointer(Ex);
ID.AddInteger(cnt);
}
示例2: Profile
/// Uniquing for the LayoutConstraintInfo.
void LayoutConstraintInfo::Profile(llvm::FoldingSetNodeID &ID,
LayoutConstraintKind Kind,
unsigned SizeInBits,
unsigned Alignment) {
ID.AddInteger((unsigned)Kind);
ID.AddInteger(SizeInBits);
ID.AddInteger(Alignment);
}
示例3: ProfileRegion
void AllocaRegion::ProfileRegion(llvm::FoldingSetNodeID& ID,
const Expr *Ex, unsigned cnt,
const MemRegion *superRegion) {
ID.AddInteger(static_cast<unsigned>(AllocaRegionKind));
ID.AddPointer(Ex);
ID.AddInteger(cnt);
ID.AddPointer(superRegion);
}
示例4: Profile
void ConstraintLocator::Profile(llvm::FoldingSetNodeID &id, Expr *anchor,
ArrayRef<PathElement> path) {
id.AddPointer(anchor);
id.AddInteger(path.size());
for (auto elt : path) {
id.AddInteger(elt.getKind());
switch (elt.getKind()) {
case GenericParameter:
id.AddPointer(elt.getGenericParameter());
break;
case Requirement:
id.AddPointer(elt.getRequirement());
break;
case Witness:
id.AddPointer(elt.getWitness());
break;
case ApplyArgument:
case ApplyFunction:
case FunctionArgument:
case FunctionResult:
case OptionalPayload:
case Member:
case MemberRefBase:
case UnresolvedMember:
case SubscriptMember:
case ConstructorMember:
case LValueConversion:
case RValueAdjustment:
case ClosureResult:
case ParentType:
case InstanceType:
case SequenceIteratorProtocol:
case GeneratorElementType:
case AutoclosureResult:
case GenericArgument:
case NamedTupleElement:
case TupleElement:
case ApplyArgToParam:
case OpenedGeneric:
case KeyPathComponent:
case ConditionalRequirement:
case TypeParameterRequirement:
case ImplicitlyUnwrappedDisjunctionChoice:
case DynamicLookupResult:
case ContextualType:
case SynthesizedArgument:
if (unsigned numValues = numNumericValuesInPathElement(elt.getKind())) {
id.AddInteger(elt.getValue());
if (numValues > 1)
id.AddInteger(elt.getValue2());
}
break;
}
}
}
示例5: Profile
void ConstraintLocator::Profile(llvm::FoldingSetNodeID &id, Expr *anchor,
ArrayRef<PathElement> path) {
id.AddPointer(anchor);
id.AddInteger(path.size());
for (auto elt : path) {
id.AddInteger(elt.getKind());
switch (elt.getKind()) {
case Archetype:
id.AddPointer(elt.getArchetype()->getCanonicalType().getPointer());
break;
case Requirement:
id.AddPointer(elt.getRequirement());
break;
case Witness:
id.AddPointer(elt.getWitness());
break;
case AssociatedType:
id.AddPointer(elt.getAssociatedType());
break;
case ApplyArgument:
case ApplyFunction:
case FunctionArgument:
case FunctionResult:
case Member:
case MemberRefBase:
case UnresolvedMember:
case SubscriptIndex:
case SubscriptMember:
case SubscriptResult:
case ConstructorMember:
case RvalueAdjustment:
case ClosureResult:
case ParentType:
case InstanceType:
case SequenceIteratorProtocol:
case GeneratorElementType:
case ArrayElementType:
case ScalarToTuple:
case Load:
case GenericArgument:
case InterpolationArgument:
case NamedTupleElement:
case TupleElement:
case ApplyArgToParam:
case OpenedGeneric:
if (unsigned numValues = numNumericValuesInPathElement(elt.getKind())) {
id.AddInteger(elt.getValue());
if (numValues > 1)
id.AddInteger(elt.getValue2());
}
break;
}
}
}
示例6: Profile
void PathDiagnosticPiece::Profile(llvm::FoldingSetNodeID &ID) const {
ID.AddInteger((unsigned) getKind());
ID.AddString(str);
// FIXME: Add profiling support for code hints.
ID.AddInteger((unsigned) getDisplayHint());
for (range_iterator I = ranges_begin(), E = ranges_end(); I != E; ++I) {
ID.AddInteger(I->getBegin().getRawEncoding());
ID.AddInteger(I->getEnd().getRawEncoding());
}
}
示例7: Profile
void PathDiagnosticPiece::Profile(llvm::FoldingSetNodeID &ID) const {
ID.AddInteger((unsigned) getKind());
ID.AddString(str);
// FIXME: Add profiling support for code hints.
ID.AddInteger((unsigned) getDisplayHint());
ArrayRef<SourceRange> Ranges = getRanges();
for (const auto &I : Ranges) {
ID.AddInteger(I.getBegin().getRawEncoding());
ID.AddInteger(I.getEnd().getRawEncoding());
}
}
示例8: ProfileRegion
void BlockDataRegion::ProfileRegion(llvm::FoldingSetNodeID& ID,
const BlockTextRegion *BC,
const LocationContext *LC,
unsigned BlkCount,
const MemRegion *sReg) {
ID.AddInteger(MemRegion::BlockDataRegionKind);
ID.AddPointer(BC);
ID.AddPointer(LC);
ID.AddInteger(BlkCount);
ID.AddPointer(sReg);
}
示例9: Profile
void TemplateArgument::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) const {
ID.AddInteger(getKind());
switch (getKind()) {
case Null:
break;
case Type:
getAsType().Profile(ID);
break;
case NullPtr:
getNullPtrType().Profile(ID);
break;
case Declaration:
ID.AddPointer(getAsDecl()? getAsDecl()->getCanonicalDecl() : 0);
break;
case Template:
case TemplateExpansion: {
TemplateName Template = getAsTemplateOrTemplatePattern();
if (TemplateTemplateParmDecl *TTP
= dyn_cast_or_null<TemplateTemplateParmDecl>(
Template.getAsTemplateDecl())) {
ID.AddBoolean(true);
ID.AddInteger(TTP->getDepth());
ID.AddInteger(TTP->getPosition());
ID.AddBoolean(TTP->isParameterPack());
} else {
ID.AddBoolean(false);
ID.AddPointer(Context.getCanonicalTemplateName(Template)
.getAsVoidPointer());
}
break;
}
case Integral:
getAsIntegral().Profile(ID);
getIntegralType().Profile(ID);
break;
case Expression:
getAsExpr()->Profile(ID, Context, true);
break;
case Pack:
ID.AddInteger(Args.NumArgs);
for (unsigned I = 0; I != Args.NumArgs; ++I)
Args.Args[I].Profile(ID, Context);
}
}
示例10: ProfileRegion
void ObjCStringRegion::ProfileRegion(llvm::FoldingSetNodeID& ID,
const ObjCStringLiteral* Str,
const MemRegion* superRegion) {
ID.AddInteger((unsigned) ObjCStringRegionKind);
ID.AddPointer(Str);
ID.AddPointer(superRegion);
}
示例11: Profile
void LocationContext::Profile(llvm::FoldingSetNodeID &ID, ContextKind k,
AnalysisContext *ctx,
const LocationContext *parent) {
ID.AddInteger(k);
ID.AddPointer(ctx);
ID.AddPointer(parent);
}
示例12: ProfileCommon
void LocationContext::ProfileCommon(llvm::FoldingSetNodeID &ID,
ContextKind ck,
AnalysisDeclContext *ctx,
const LocationContext *parent,
const void *data) {
ID.AddInteger(ck);
ID.AddPointer(ctx);
ID.AddPointer(parent);
ID.AddPointer(data);
}
示例13: Profile
void Inst::Profile(llvm::FoldingSetNodeID &ID) const {
ID.AddInteger(K);
ID.AddInteger(Width);
switch (K) {
case Const:
case UntypedConst:
Val.Profile(ID);
return;
case Var:
assert(0 && "Var instructions should not be in FoldingSet");
case Phi:
ID.AddPointer(B);
break;
default:
break;
}
for (auto Op : Ops)
ID.AddPointer(Op);
}
示例14: Profile
void RawSyntax::Profile(llvm::FoldingSetNodeID &ID, tok TokKind,
OwnedString Text, ArrayRef<TriviaPiece> LeadingTrivia,
ArrayRef<TriviaPiece> TrailingTrivia) {
ID.AddInteger(unsigned(TokKind));
switch (TokKind) {
#define TOKEN_DEFAULT(NAME) case tok::NAME:
#define PUNCTUATOR(NAME, X) TOKEN_DEFAULT(NAME)
#define KEYWORD(KW) TOKEN_DEFAULT(kw_##KW)
#define POUND_KEYWORD(KW) TOKEN_DEFAULT(pound_##KW)
#include "swift/Syntax/TokenKinds.def"
break;
default:
ID.AddString(Text.str());
break;
}
for (auto &Piece : LeadingTrivia)
Piece.Profile(ID);
for (auto &Piece : TrailingTrivia)
Piece.Profile(ID);
}
示例15: Profile
void MemSpaceRegion::Profile(llvm::FoldingSetNodeID& ID) const {
ID.AddInteger((unsigned)getKind());
}