[llvm] r259191 - [IR] Move definitions of users of Use::set to Value.h
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 29 04:47:05 PST 2016
Author: d0k
Date: Fri Jan 29 06:47:05 2016
New Revision: 259191
URL: http://llvm.org/viewvc/llvm-project?rev=259191&view=rev
Log:
[IR] Move definitions of users of Use::set to Value.h
Still ugly, but at least Use.h is self-contained again.
Modified:
llvm/trunk/include/llvm/IR/Use.h
llvm/trunk/include/llvm/IR/Value.h
Modified: llvm/trunk/include/llvm/IR/Use.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Use.h?rev=259191&r1=259190&r2=259191&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Use.h (original)
+++ llvm/trunk/include/llvm/IR/Use.h Fri Jan 29 06:47:05 2016
@@ -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; }
Modified: llvm/trunk/include/llvm/IR/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Value.h?rev=259191&r1=259190&r2=259191&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Value.h (original)
+++ llvm/trunk/include/llvm/IR/Value.h Fri Jan 29 06:47:05 2016
@@ -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.
More information about the llvm-commits
mailing list