зеркало из https://github.com/microsoft/clang-1.git
ProgramPoint::Profile now specially handles PostStmtCustom (hashes on tag and data) so that clients don't need a unique address for the pair itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65079 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
08eddd9466
Коммит
2680b5f926
|
@ -69,7 +69,7 @@ protected:
|
|||
|
||||
void* getData1() const {
|
||||
Kind k = getKind(); k = k;
|
||||
assert(k == BlockEdgeKind || (k >= MinPostStmtKind && k < MaxPostStmtKind));
|
||||
assert(k == BlockEdgeKind ||(k >= MinPostStmtKind && k <= MaxPostStmtKind));
|
||||
return reinterpret_cast<void*>(Data.first & ~Mask);
|
||||
}
|
||||
|
||||
|
@ -111,8 +111,15 @@ public:
|
|||
|
||||
void Profile(llvm::FoldingSetNodeID& ID) const {
|
||||
ID.AddPointer(reinterpret_cast<void*>(Data.first));
|
||||
ID.AddPointer(reinterpret_cast<void*>(Data.second));
|
||||
}
|
||||
if (getKind() != PostStmtCustomKind)
|
||||
ID.AddPointer(reinterpret_cast<void*>(Data.second));
|
||||
else {
|
||||
const std::pair<const void*, const void*> *P =
|
||||
reinterpret_cast<std::pair<const void*, const void*>*>(Data.second);
|
||||
ID.AddPointer(P->first);
|
||||
ID.AddPointer(P->second);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class BlockEntrance : public ProgramPoint {
|
||||
|
@ -183,6 +190,7 @@ public:
|
|||
};
|
||||
|
||||
class PostStmtCustom : public PostStmt {
|
||||
public:
|
||||
PostStmtCustom(const Stmt* S,
|
||||
const std::pair<const void*, const void*>* TaggedData)
|
||||
: PostStmt(S, TaggedData) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче