Displaying 4 results from an estimated 4 matches for "indexty".
2008 Jul 23
0
[LLVMdev] GEP::getIndexValid() with other iterators
...is returned if the indices are invalid for the specified
// pointer type.
//
-const Type* GetElementPtrInst::getIndexedType(const Type *Ptr,
- Value* const *Idxs,
- unsigned NumIdx) {
+template <typename IndexTy>
+static const Type* getIndexedTypeInternal(const Type *Ptr,
+ IndexTy const *Idxs,
+ unsigned NumIdx) {
const PointerType *PTy = dyn_cast<PointerType>(Ptr);
if (!PTy) return 0; // Type isn't a pointer type!
c...
2008 Jul 23
2
[LLVMdev] GEP::getIndexValid() with other iterators
On Jul 22, 2008, at 11:54 PM, Matthijs Kooijman wrote:
> Hi Chris,
>
>
>> I'd prefer to not turn this into a template. Why not just define a
>> version that takes an array of uint64_t's or something like that?
> because I want to be able to pass in iterators. I could define a
> version that
> takes std<uint64_t>::iterators, but next thing we know, we
2008 Jul 16
0
[LLVMdev] GEP::getIndexValid() with other iterators
...============================================================
--- include/llvm/Instructions.h (revision 53672)
+++ include/llvm/Instructions.h (working copy)
@@ -407,9 +407,35 @@
/// Null is returned if the indices are invalid for the specified
/// pointer type.
///
+ template <typename IndexTy>
static const Type *getIndexedType(const Type *Ptr,
- Value* const *Idx, unsigned NumIdx);
+ IndexTy const *Idxs, unsigned NumIdx) {
+ const PointerType *PTy = dyn_cast<PointerType>(Ptr);
+ if (!PTy) return 0;...
2008 Jul 16
3
[LLVMdev] GEP::getIndexValid() with other iterators
Hi all,
currently, GetElementPtrInst has a method getIndexedType, which has a
templated variant. You pass in a begin and an end iterator, and it will find
the indexed type for those. However, both iterators must iterate over Value*.
For some argpromotion code, I would like to pass in iterators that iterate
over unsigneds instead of Value*. I currently solve this by transforming my