forked from OSchip/llvm-project
IR: Sink MDNode::Hash down to GenericMDNode::Hash
Part of PR21532. llvm-svn: 222212
This commit is contained in:
parent
c23610b1e4
commit
4db24cc49b
|
@ -164,10 +164,6 @@ protected:
|
||||||
llvm_unreachable("Constructor throws?");
|
llvm_unreachable("Constructor throws?");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Sink this into GenericMDNode. Can't do this until operands are
|
|
||||||
// allocated at the front (currently they're at the back).
|
|
||||||
unsigned Hash;
|
|
||||||
|
|
||||||
/// \brief Subclass data enums.
|
/// \brief Subclass data enums.
|
||||||
enum {
|
enum {
|
||||||
/// FunctionLocalBit - This bit is set if this MDNode is function local.
|
/// FunctionLocalBit - This bit is set if this MDNode is function local.
|
||||||
|
@ -285,8 +281,10 @@ class GenericMDNode : public MDNode {
|
||||||
friend class MDNode;
|
friend class MDNode;
|
||||||
friend class LLVMContextImpl;
|
friend class LLVMContextImpl;
|
||||||
|
|
||||||
|
unsigned Hash;
|
||||||
|
|
||||||
GenericMDNode(LLVMContext &C, ArrayRef<Value *> Vals, bool isFunctionLocal)
|
GenericMDNode(LLVMContext &C, ArrayRef<Value *> Vals, bool isFunctionLocal)
|
||||||
: MDNode(C, GenericMDNodeVal, Vals, isFunctionLocal) {}
|
: MDNode(C, GenericMDNodeVal, Vals, isFunctionLocal), Hash(0) {}
|
||||||
~GenericMDNode();
|
~GenericMDNode();
|
||||||
|
|
||||||
void dropAllReferences();
|
void dropAllReferences();
|
||||||
|
|
|
@ -140,7 +140,7 @@ void MDNode::operator delete(void *Mem) {
|
||||||
|
|
||||||
MDNode::MDNode(LLVMContext &C, unsigned ID, ArrayRef<Value *> Vals,
|
MDNode::MDNode(LLVMContext &C, unsigned ID, ArrayRef<Value *> Vals,
|
||||||
bool isFunctionLocal)
|
bool isFunctionLocal)
|
||||||
: Metadata(C, ID), Hash(0) {
|
: Metadata(C, ID) {
|
||||||
NumOperands = Vals.size();
|
NumOperands = Vals.size();
|
||||||
|
|
||||||
if (isFunctionLocal)
|
if (isFunctionLocal)
|
||||||
|
|
Loading…
Reference in New Issue