llvm.org GIT mirror llvm / b92f50f
Add long overdue methods git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16921 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
4 changed file(s) with 45 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
9494 TerminatorInst *getTerminator();
9595 const TerminatorInst *const getTerminator() const;
9696
97 /// removeFromParent - This method unlinks 'this' from the containing
98 /// function, but does not delete it.
99 ///
100 void removeFromParent();
101
102 /// eraseFromParent - This method unlinks 'this' from the containing function
103 /// and deletes it.
104 ///
105 void eraseFromParent();
106
107
108
97109 //===--------------------------------------------------------------------===//
98110 /// Instruction iterator methods
99111 ///
112112 dropAllReferences();
113113 setLinkage(ExternalLinkage);
114114 }
115
116 /// removeFromParent - This method unlinks 'this' from the containing module,
117 /// but does not delete it.
118 ///
119 void removeFromParent();
120
121 /// eraseFromParent - This method unlinks 'this' from the containing module
122 /// and deletes it.
123 ///
124 void eraseFromParent();
125
115126
116127 // getNext/Prev - Return the next or previous function in the list. These
117128 // methods should never be used directly, and are only used to implement the
9696 ///
9797 bool isConstant() const { return isConstantGlobal; }
9898 void setConstant(bool Value) { isConstantGlobal = Value; }
99
100 /// removeFromParent - This method unlinks 'this' from the containing module,
101 /// but does not delete it.
102 ///
103 void removeFromParent();
104
105 /// eraseFromParent - This method unlinks 'this' from the containing module
106 /// and deletes it.
107 ///
108 void eraseFromParent();
99109
100110 /// Override Constant's implementation of this method so we can
101111 /// replace constant initializers.
5656 // Specialize setName to handle symbol table majik...
5757 virtual void setName(const std::string &name, SymbolTable *ST = 0);
5858
59 /// mayWriteToMemory - Return true if this instruction may modify memory.
60 ///
61 virtual bool mayWriteToMemory() const { return false; }
62
5963 /// clone() - Create a copy of 'this' instruction that is identical in all
6064 /// ways except the following:
6165 /// * The instruction has no parent
7579 Instruction *getPrev() { return Prev; }
7680 const Instruction *getPrev() const { return Prev; }
7781
78 /// mayWriteToMemory - Return true if this instruction may modify memory.
82 /// removeFromParent - This method unlinks 'this' from the containing basic
83 /// block, but does not delete it.
7984 ///
80 virtual bool mayWriteToMemory() const { return false; }
85 void removeFromParent();
86
87 /// eraseFromParent - This method unlinks 'this' from the containing basic
88 /// block and deletes it.
89 ///
90 void eraseFromParent();
8191
8292 // ---------------------------------------------------------------------------
8393 /// Subclass classification... getOpcode() returns a member of