Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace raw pointers with unique_ptr and vector #49

Closed

Conversation

Quincunx271
Copy link
Member

@Quincunx271 Quincunx271 commented Mar 11, 2020

A very-much-WIP branch for replacing raw pointer arrays with either unique_ptr<T[]> or vector<T>.

I can say that this currently compiles, but I haven't run anything with it. See #47 . There's still a lot of work to do here and I'm not prioritizing this, but I figured it would be good to PR this to allow collaboration / prevent duplicate work. Feel free to push more related changes to this branch.


I'm preferring using vector<T> when possible, but if we are unsure if it is possible, unique_ptr<T[]> allows us to more closely replace the raw pointer.

Prefer using vector<T> when possible, but if we are unsure if it is
possible, unique_ptr<T[]> allows us to more closely replace the raw
pointer.
@paul-mchugh
Copy link
Member

I have a commit coming that will change the raw pointers in aco.cpp and fix other bugs. The aco changes you are making are redundant.

@kerbowa
Copy link
Member

kerbowa commented Mar 11, 2020

In most cases std::vector should be replaced with llvm::small_vector.

This is standard in LLVM patches.

@Quincunx271
Copy link
Member Author

Closing this. I'll open a new PR when I'm more actively working on this

@Quincunx271 Quincunx271 closed this Apr 9, 2020
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.

3 participants