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:
8728f19
)
make operand accessors const-correct
author
Chris Lattner
<sabre@nondot.org>
Sun, 2 Mar 2008 05:32:05 +0000
(
05:32
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 2 Mar 2008 05:32:05 +0000
(
05:32
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47814
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Instructions.h
patch
|
blob
|
history
diff --git
a/include/llvm/Instructions.h
b/include/llvm/Instructions.h
index a7fe6a0ac7459c606f38f33ff8d038ea49383202..2e6b85b729b18cb50b15a736b65b63ffafac1cca 100644
(file)
--- a/
include/llvm/Instructions.h
+++ b/
include/llvm/Instructions.h
@@
-1219,7
+1219,11
@@
public:
}
/// Transparently provide more efficient getOperand methods.
- Value *getOperand(unsigned i) const {
+ const Value *getOperand(unsigned i) const {
+ assert(i < 3 && "getOperand() out of range!");
+ return Ops[i];
+ }
+ Value *getOperand(unsigned i) {
assert(i < 3 && "getOperand() out of range!");
return Ops[i];
}