summaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2008-06-04 16:14:12 +0000
committerMatthijs Kooijman <matthijs@stdin.nl>2008-06-04 16:14:12 +0000
commit338169ddc9bb4061f248d0afbf0ec87b6bf2227d (patch)
treefc887fa7d440c16d6c531fb1d811d77079bce07a /include/llvm/Instructions.h
parent61399af13fd46fe1be85807ae1d595b1b9ff62cf (diff)
downloadexternal_llvm-338169ddc9bb4061f248d0afbf0ec87b6bf2227d.zip
external_llvm-338169ddc9bb4061f248d0afbf0ec87b6bf2227d.tar.gz
external_llvm-338169ddc9bb4061f248d0afbf0ec87b6bf2227d.tar.bz2
Add a Name parameter to two of the init methods of GetElementPointer to make the name setting more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 0b9aba9..66cdc39 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -379,8 +379,8 @@ static inline const Type *checkType(const Type *Ty) {
///
class GetElementPtrInst : public Instruction {
GetElementPtrInst(const GetElementPtrInst &GEPI);
- void init(Value *Ptr, Value* const *Idx, unsigned NumIdx);
- void init(Value *Ptr, Value *Idx);
+ void init(Value *Ptr, Value* const *Idx, unsigned NumIdx, const std::string &Name);
+ void init(Value *Ptr, Value *Idx, const std::string &Name);
template<typename InputIterator>
void init(Value *Ptr, InputIterator IdxBegin, InputIterator IdxEnd,
@@ -392,14 +392,12 @@ class GetElementPtrInst : public Instruction {
if (NumIdx > 0) {
// This requires that the iterator points to contiguous memory.
- init(Ptr, &*IdxBegin, NumIdx); // FIXME: for the general case
+ init(Ptr, &*IdxBegin, NumIdx, Name); // FIXME: for the general case
// we have to build an array here
}
else {
- init(Ptr, 0, NumIdx);
+ init(Ptr, 0, NumIdx, Name);
}
-
- setName(Name);
}
/// getIndexedType - Returns the type of the element that would be loaded with