Skip to content

Conversation

@CodaFi
Copy link
Member

@CodaFi CodaFi commented Feb 26, 2017

Only controversial thing could be the use of subscript to retrieve the alignment of parameters. This can always be remodeled as a property that returns a sequence or collection that wraps a sequence that accesses these values, but I'm not sure that's a cleaner model than this.

@harlanhaskins
Copy link
Member

LGTM modulo that change

@CodaFi
Copy link
Member Author

CodaFi commented Mar 3, 2017

Did you mean to follow through with that change-the-subscripts comment? Have an API in mind here?

@harlanhaskins
Copy link
Member

Well, basically there's nothing that tells me that call[2] is going to let me set an alignment.

@CodaFi
Copy link
Member Author

CodaFi commented Mar 3, 2017

public func parameterAlignment(at i : Int) -> Int

@CodaFi
Copy link
Member Author

CodaFi commented Mar 3, 2017

Or...

public func setParameterAlignment(at i : Int, to alignment: Int) {
    LLVMSetInstrParamAlignment(self.llvm, UInt32(i), UInt32(alignment))
  }

@harlanhaskins
Copy link
Member

Definitely setParameterAlignment(at:)

@CodaFi
Copy link
Member Author

CodaFi commented Mar 3, 2017

⛵️

@CodaFi CodaFi merged commit 66a0be4 into llvm-swift:master Mar 3, 2017
@CodaFi CodaFi deleted the cold-calling branch March 3, 2017 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants