Skip to content

Convert APIs to use ArrayRef #9586

Closed
Closed
@lattner

Description

@lattner
Bugzilla Link 9214
Resolution FIXED
Resolved on Jul 26, 2011 01:59
Version 1.0
OS All
CC @jayfoad,@markus-oberhumer

Extended Description

Various LLVM APIs (such as the Constant*::get APIs, the GetElementPtrInst::Create methods, IRBuilder CreateGEP method, etc) that take multiple input values take std::vectors, and some now also can take a pointer to the start of an array and a count (for use with SmallVector). The new ArrayRef class subsumes both of these uses and is more convenient to use.

The implementation side of these should switch to use a FoldingSet (tracked by #1582 ), eliminating the temporary std::vector stored in various maps.

Also, ConstantExpr::getIndices() should be changed to return an ArrayRef.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions