diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-29 02:46:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-29 02:46:09 +0000 |
commit | d8eb2cf571f473fafd51b7016ba7753c2ce40e04 (patch) | |
tree | d90c275f19c1526217c647ee88944083e00512c2 /llvm/lib/VMCore/Instruction.cpp | |
parent | b9c8651b8cf963e6f286d6b44a4cababba225994 (diff) | |
download | bcm5719-llvm-d8eb2cf571f473fafd51b7016ba7753c2ce40e04.tar.gz bcm5719-llvm-d8eb2cf571f473fafd51b7016ba7753c2ce40e04.zip |
sink the Instruction::HasMetadata bit into SubclassData.
llvm-svn: 92240
Diffstat (limited to 'llvm/lib/VMCore/Instruction.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instruction.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp index f468c1bf3af..85fd0e85514 100644 --- a/llvm/lib/VMCore/Instruction.cpp +++ b/llvm/lib/VMCore/Instruction.cpp @@ -24,8 +24,7 @@ using namespace llvm; Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, Instruction *InsertBefore) - : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(0), - HasMetadata(false) { + : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(0) { // Make sure that we get added to a basicblock LeakDetector::addGarbageObject(this); @@ -39,8 +38,7 @@ Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) - : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(0), - HasMetadata(false) { + : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(0) { // Make sure that we get added to a basicblock LeakDetector::addGarbageObject(this); @@ -53,7 +51,7 @@ Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, // Out of line virtual method, so the vtable, etc has a home. Instruction::~Instruction() { assert(Parent == 0 && "Instruction still linked in the program!"); - if (HasMetadata) + if (hasMetadata()) getContext().pImpl->TheMetadata.ValueIsDeleted(this); } @@ -464,7 +462,7 @@ bool Instruction::isSafeToSpeculativelyExecute() const { Instruction *Instruction::clone() const { Instruction *New = clone_impl(); New->SubclassOptionalData = SubclassOptionalData; - if (HasMetadata) + if (hasMetadata()) getContext().pImpl->TheMetadata.ValueIsCloned(this, New); return New; } |