Use llvm::SmallVectors for struct member types and function types.

Further reduction of dynamic memory allocation...
This commit is contained in:
Matt Pharr
2012-05-04 13:43:29 -07:00
parent 413264eaae
commit 8006589828
6 changed files with 51 additions and 49 deletions

7
decl.h
View File

@@ -55,6 +55,7 @@
#define ISPC_DECL_H
#include "ispc.h"
#include <llvm/ADT/SmallVector.h>
struct VariableDeclaration;
@@ -219,8 +220,8 @@ struct StructDeclaration {
/** Given a set of StructDeclaration instances, this returns the types of
the elements of the corresponding struct and their names. */
extern void GetStructTypesNamesPositions(const std::vector<StructDeclaration *> &sd,
std::vector<const Type *> *elementTypes,
std::vector<std::string> *elementNames,
std::vector<SourcePos> *elementPositions);
llvm::SmallVector<const Type *, 8> *elementTypes,
llvm::SmallVector<std::string, 8> *elementNames,
llvm::SmallVector<SourcePos, 8> *elementPositions);
#endif // ISPC_DECL_H