зеркало из https://github.com/microsoft/clang-1.git
Fixed another obscure node-caching bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47898 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
59894f9d45
Коммит
7fa6a4079f
|
@ -162,8 +162,16 @@ public:
|
|||
}
|
||||
|
||||
// Profiling (for FoldingSet).
|
||||
|
||||
static inline void Profile(llvm::FoldingSetNodeID& ID,
|
||||
const ProgramPoint& Loc,
|
||||
StateTy state) {
|
||||
ID.Add(Loc);
|
||||
GRTrait<StateTy>::Profile(ID, state);
|
||||
}
|
||||
|
||||
inline void Profile(llvm::FoldingSetNodeID& ID) const {
|
||||
GRTrait<StateTy>::Profile(ID, getState());
|
||||
Profile(ID, getLocation(), getState());
|
||||
}
|
||||
|
||||
// Iterators over successor and predecessor vertices.
|
||||
|
@ -307,8 +315,7 @@ public:
|
|||
llvm::FoldingSetNodeID profile;
|
||||
void* InsertPos = 0;
|
||||
|
||||
GRTrait<StateTy>::Profile(profile, State);
|
||||
profile.Add(L);
|
||||
NodeTy::Profile(profile, L, State);
|
||||
NodeTy* V = Nodes.FindNodeOrInsertPos(profile, InsertPos);
|
||||
|
||||
if (!V) {
|
||||
|
|
|
@ -145,8 +145,10 @@ public:
|
|||
template<> struct GRTrait<ValueState*> {
|
||||
static inline void* toPtr(ValueState* St) { return (void*) St; }
|
||||
static inline ValueState* toState(void* P) { return (ValueState*) P; }
|
||||
static inline void Profile(llvm::FoldingSetNodeID& profile, ValueState* St) {
|
||||
ValueState::Profile(profile, St);
|
||||
static inline void Profile(llvm::FoldingSetNodeID& profile, ValueState* St) {
|
||||
// At this point states have already been uniqued. Just
|
||||
// add the pointer.
|
||||
profile.AddPointer(St);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче