projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6501153
)
make the Op<N> methods protected, how it was intended to be
author
Gabor Greif
<ggreif@gmail.com>
Mon, 9 Mar 2009 19:57:49 +0000
(19:57 +0000)
committer
Gabor Greif
<ggreif@gmail.com>
Mon, 9 Mar 2009 19:57:49 +0000
(19:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66430
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/User.h
patch
|
blob
|
history
diff --git
a/include/llvm/User.h
b/include/llvm/User.h
index bb1a862c86070650af3e97bf1f5d5a670a1c72fc..f2df23e34125570414dca070f1b9b4c7d54d2b13 100644
(file)
--- a/
include/llvm/User.h
+++ b/
include/llvm/User.h
@@
-82,12
+82,14
@@
public:
void operator delete(void*, unsigned) {
assert(0 && "Constructor throws?");
}
+protected:
template <unsigned Idx> Use &Op() {
return OperandTraits<User>::op_begin(this)[Idx];
}
template <unsigned Idx> const Use &Op() const {
return OperandTraits<User>::op_begin(const_cast<User*>(this))[Idx];
}
+public:
Value *getOperand(unsigned i) const {
assert(i < NumOperands && "getOperand() out of range!");
return OperandList[i];