1 //===-- VectorExtras.h - Helper functions for std::vector -------*- C++ -*-===//
3 // This file contains helper functions which are useful for working with the
6 //===----------------------------------------------------------------------===//
8 #ifndef SUPPORT_VECTOREXTRAS_H
9 #define SUPPORT_VECTOREXTRAS_H
13 /// make_vector - Helper function which is useful for building temporary vectors
14 /// to pass into type construction of CallInst ctors. This turns a null
15 /// terminated list of pointers (or other value types) into a real live vector.
18 inline std::vector<T> make_vector(T A, ...) {
21 std::vector<T> Result;
23 while (T Val = va_arg(Args, T))
24 Result.push_back(Val);