projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
[oota-llvm.git]
/
lib
/
Support
/
FoldingSet.cpp
diff --git
a/lib/Support/FoldingSet.cpp
b/lib/Support/FoldingSet.cpp
index 2d2279cefe5c1f24c6a4f49c9e99b92bbaff48a2..bf50ed43dfe178414e9eaa544f6acad3f52eb25c 100644
(file)
--- a/
lib/Support/FoldingSet.cpp
+++ b/
lib/Support/FoldingSet.cpp
@@
-17,6
+17,7
@@
#include "llvm/ADT/FoldingSet.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
#include "llvm/ADT/FoldingSet.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
+#include <cstring>
using namespace llvm;
//===----------------------------------------------------------------------===//
using namespace llvm;
//===----------------------------------------------------------------------===//
@@
-326,7
+327,8
@@
FoldingSetImpl::Node *FoldingSetImpl::GetOrInsertNode(FoldingSetImpl::Node *N) {
FoldingSetIteratorImpl::FoldingSetIteratorImpl(void **Bucket) {
// Skip to the first non-null non-self-cycle bucket.
FoldingSetIteratorImpl::FoldingSetIteratorImpl(void **Bucket) {
// Skip to the first non-null non-self-cycle bucket.
- while (*Bucket == 0 || GetNextPtr(*Bucket) == 0)
+ while (*Bucket != reinterpret_cast<void*>(-1) &&
+ (*Bucket == 0 || GetNextPtr(*Bucket) == 0))
++Bucket;
NodePtr = static_cast<FoldingSetNode*>(*Bucket);
++Bucket;
NodePtr = static_cast<FoldingSetNode*>(*Bucket);
@@
-345,7
+347,8
@@
void FoldingSetIteratorImpl::advance() {
// Skip to the next non-null non-self-cycle bucket.
do {
++Bucket;
// Skip to the next non-null non-self-cycle bucket.
do {
++Bucket;
- } while (*Bucket == 0 || GetNextPtr(*Bucket) == 0);
+ } while (*Bucket != reinterpret_cast<void*>(-1) &&
+ (*Bucket == 0 || GetNextPtr(*Bucket) == 0));
NodePtr = static_cast<FoldingSetNode*>(*Bucket);
}
NodePtr = static_cast<FoldingSetNode*>(*Bucket);
}