#include "llvm/Support/ValueHandle.h"
using namespace llvm;
#include "llvm/Support/ValueHandle.h"
using namespace llvm;
-//===----------------------------------------------------------------------===//
-// MetadataBase implementation.
-//
-
//===----------------------------------------------------------------------===//
// MDString implementation.
//
//===----------------------------------------------------------------------===//
// MDString implementation.
//
void MDNode::Profile(FoldingSetNodeID &ID) const {
for (unsigned i = 0, e = getNumElements(); i != e; ++i)
ID.AddPointer(getElement(i));
void MDNode::Profile(FoldingSetNodeID &ID) const {
for (unsigned i = 0, e = getNumElements(); i != e; ++i)
ID.AddPointer(getElement(i));
+ // HASH TABLE COLLISIONS?
+ // DO NOT REINSERT AFTER AN OPERAND DROPS TO NULL!
MDStoreTy::iterator I = MetadataStore.find(In1);
assert(I != MetadataStore.end() && "Invalid custom metadata info!");
MDStoreTy::iterator I = MetadataStore.find(In1);
assert(I != MetadataStore.end() && "Invalid custom metadata info!");
- // FIXME : Give all metadata handlers a chance to adjust.
-
+ // FIXME: Give all metadata handlers a chance to adjust.
MDMapTy &In1Info = I->second;
MDMapTy &In1Info = I->second;
for (MDMapTy::iterator I = In1Info.begin(), E = In1Info.end(); I != E; ++I)
addMD(I->first, I->second, In2);
}
for (MDMapTy::iterator I = In1Info.begin(), E = In1Info.end(); I != E; ++I)
addMD(I->first, I->second, In2);
}
- // FIXME : Give custom handlers a chance to override this.
+ // FIXME: Give custom handlers a chance to override this.
ValueIsCloned(I1, I2);
}
//===----------------------------------------------------------------------===//
// MetadataContext implementation.
//
ValueIsCloned(I1, I2);
}
//===----------------------------------------------------------------------===//
// MetadataContext implementation.
//
-MetadataContext::MetadataContext()
- : pImpl(new MetadataContextImpl()) { }
+MetadataContext::MetadataContext() : pImpl(new MetadataContextImpl()) { }
MetadataContext::~MetadataContext() { delete pImpl; }
/// isValidName - Return true if Name is a valid custom metadata handler name.
MetadataContext::~MetadataContext() { delete pImpl; }
/// isValidName - Return true if Name is a valid custom metadata handler name.