diff --git a/clang/include/clang/AST/APValue.h b/clang/include/clang/AST/APValue.h --- a/clang/include/clang/AST/APValue.h +++ b/clang/include/clang/AST/APValue.h @@ -151,7 +151,7 @@ static LValueBase getDynamicAlloc(DynamicAllocLValue LV, QualType Type); static LValueBase getTypeInfo(TypeInfoLValue LV, QualType TypeInfo); - void profile(llvm::FoldingSetNodeID &ID) const; + void Profile(llvm::FoldingSetNodeID &ID) const; template bool is() const { return Ptr.is(); } @@ -219,7 +219,7 @@ } uint64_t getAsArrayIndex() const { return Value; } - void profile(llvm::FoldingSetNodeID &ID) const; + void Profile(llvm::FoldingSetNodeID &ID) const; friend bool operator==(LValuePathEntry A, LValuePathEntry B) { return A.Value == B.Value; @@ -363,10 +363,10 @@ /// Swaps the contents of this and the given APValue. void swap(APValue &RHS); - /// Profile this value. There is no guarantee that values of different + /// profile this value. There is no guarantee that values of different /// types will not produce the same profiled value, so the type should /// typically also be profiled if it's not implied by the context. - void profile(llvm::FoldingSetNodeID &ID) const; + void Profile(llvm::FoldingSetNodeID &ID) const; ValueKind getKind() const { return Kind; } diff --git a/clang/lib/AST/APValue.cpp b/clang/lib/AST/APValue.cpp --- a/clang/lib/AST/APValue.cpp +++ b/clang/lib/AST/APValue.cpp @@ -77,7 +77,7 @@ return QualType::getFromOpaquePtr(DynamicAllocType); } -void APValue::LValueBase::profile(llvm::FoldingSetNodeID &ID) const { +void APValue::LValueBase::Profile(llvm::FoldingSetNodeID &ID) const { ID.AddPointer(Ptr.getOpaqueValue()); if (is() || is()) return; @@ -103,7 +103,7 @@ Value = reinterpret_cast(BaseOrMember.getOpaqueValue()); } -void APValue::LValuePathEntry::profile(llvm::FoldingSetNodeID &ID) const { +void APValue::LValuePathEntry::Profile(llvm::FoldingSetNodeID &ID) const { ID.AddInteger(Value); } @@ -414,7 +414,7 @@ std::swap(Data, RHS.Data); } -void APValue::profile(llvm::FoldingSetNodeID &ID) const { +void APValue::Profile(llvm::FoldingSetNodeID &ID) const { ID.AddInteger(Kind); switch (Kind) { @@ -430,10 +430,10 @@ case Struct: ID.AddInteger(getStructNumBases()); for (unsigned I = 0, N = getStructNumBases(); I != N; ++I) - getStructBase(I).profile(ID); + getStructBase(I).Profile(ID); ID.AddInteger(getStructNumFields()); for (unsigned I = 0, N = getStructNumFields(); I != N; ++I) - getStructField(I).profile(ID); + getStructField(I).Profile(ID); return; case Union: @@ -442,7 +442,7 @@ return; } ID.AddPointer(getUnionField()->getCanonicalDecl()); - getUnionValue().profile(ID); + getUnionValue().Profile(ID); return; case Array: { @@ -459,9 +459,9 @@ // ['a', 'c', 'x', 'x', 'x'] is profiled as // [5, 'x', 3, 'c', 'a'] llvm::FoldingSetNodeID FillerID; - (hasArrayFiller() ? getArrayFiller() : - getArrayInitializedElt(getArrayInitializedElts() - - 1)).profile(FillerID); + (hasArrayFiller() ? getArrayFiller() + : getArrayInitializedElt(getArrayInitializedElts() - 1)) + .Profile(FillerID); ID.AddNodeID(FillerID); unsigned NumFillers = getArraySize() - getArrayInitializedElts(); unsigned N = getArrayInitializedElts(); @@ -481,7 +481,7 @@ // element. if (N != getArraySize()) { llvm::FoldingSetNodeID ElemID; - getArrayInitializedElt(N - 1).profile(ElemID); + getArrayInitializedElt(N - 1).Profile(ElemID); if (ElemID != FillerID) { ID.AddInteger(NumFillers); ID.AddNodeID(ElemID); @@ -497,14 +497,14 @@ // Emit the remaining elements. for (; N != 0; --N) - getArrayInitializedElt(N - 1).profile(ID); + getArrayInitializedElt(N - 1).Profile(ID); return; } case Vector: ID.AddInteger(getVectorLength()); for (unsigned I = 0, N = getVectorLength(); I != N; ++I) - getVectorElt(I).profile(ID); + getVectorElt(I).Profile(ID); return; case Int: @@ -533,7 +533,7 @@ return; case LValue: - getLValueBase().profile(ID); + getLValueBase().Profile(ID); ID.AddInteger(getLValueOffset().getQuantity()); ID.AddInteger(isNullPointer()); ID.AddInteger(isLValueOnePastTheEnd()); @@ -541,7 +541,7 @@ // to union members, but we don't have the type here so we don't know // how to interpret the entries. for (LValuePathEntry E : getLValuePath()) - E.profile(ID); + E.Profile(ID); return; case MemberPointer: