Forgot to commit the ValueTracking header file along with r52396.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 17 Jun 2008 13:54:33 +0000 (13:54 +0000)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 17 Jun 2008 13:54:33 +0000 (13:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52401 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/ValueTracking.h

index 4804fc5d2ee82ae5f62e5fa6d05f854c2cab487c..73f87713cb2ef28208b8c9173a00fd393d5ce00d 100644 (file)
@@ -62,6 +62,13 @@ namespace llvm {
                          const unsigned *idx_begin,
                          const unsigned *idx_end,
                          Instruction *InsertBefore = 0);
+
+  /// This is a convenience wrapper for finding values indexed by a single index
+  /// only.
+  inline Value *FindInsertedValue(Value *V, const unsigned Idx,
+                                 Instruction *InsertBefore = 0) {
+    return FindInsertedValue(V, &Idx, &Idx + 1, InsertBefore);
+  }
 } // end namespace llvm
 
 #endif