summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-01-29 12:47:05 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-01-29 12:47:05 +0000
commit34ac5801645f44829807b221fb196dac1946b359 (patch)
treec9a7f29e56d6406ac6814164985698d6b496aaf9
parentccb7a86c595b4800799c9713dfbe4e8d75c6c295 (diff)
downloadbcm5719-llvm-34ac5801645f44829807b221fb196dac1946b359.tar.gz
bcm5719-llvm-34ac5801645f44829807b221fb196dac1946b359.zip
[IR] Move definitions of users of Use::set to Value.h
Still ugly, but at least Use.h is self-contained again. llvm-svn: 259191
-rw-r--r--llvm/include/llvm/IR/Use.h10
-rw-r--r--llvm/include/llvm/IR/Value.h10
2 files changed, 12 insertions, 8 deletions
diff --git a/llvm/include/llvm/IR/Use.h b/llvm/include/llvm/IR/Use.h
index a738677f8e5..dc65d2c65ee 100644
--- a/llvm/include/llvm/IR/Use.h
+++ b/llvm/include/llvm/IR/Use.h
@@ -101,14 +101,8 @@ public:
inline void set(Value *Val);
- Value *operator=(Value *RHS) {
- set(RHS);
- return RHS;
- }
- const Use &operator=(const Use &RHS) {
- set(RHS.Val);
- return *this;
- }
+ inline Value *operator=(Value *RHS);
+ inline const Use &operator=(const Use &RHS);
Value *operator->() { return Val; }
const Value *operator->() const { return Val; }
diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h
index 1e08a4a56b8..348ad977c09 100644
--- a/llvm/include/llvm/IR/Value.h
+++ b/llvm/include/llvm/IR/Value.h
@@ -602,6 +602,16 @@ void Use::set(Value *V) {
if (V) V->addUse(*this);
}
+Value *Use::operator=(Value *RHS) {
+ set(RHS);
+ return RHS;
+}
+
+const Use &Use::operator=(const Use &RHS) {
+ set(RHS.Val);
+ return *this;
+}
+
template <class Compare> void Value::sortUseList(Compare Cmp) {
if (!UseList || !UseList->Next)
// No need to sort 0 or 1 uses.
OpenPOWER on IntegriCloud