This is an archive of the discontinued LLVM Phabricator instance.

Make AutoComplete code use StringRef
ClosedPublic

Authored by zturner on Nov 15 2016, 5:12 PM.

Details

Summary

As per the title. beanz@, could you specifically look over my usage of llvm::Twine? This is the first time I've used this class, and I'm not sure if I'm using it correctly / efficiently.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner updated this revision to Diff 78110.Nov 15 2016, 5:12 PM
zturner retitled this revision from to Make AutoComplete code use StringRef.
zturner updated this object.
zturner added reviewers: beanz, tfiala.
zturner added a subscriber: lldb-commits.
tfiala edited edge metadata.Nov 15 2016, 5:46 PM

I can give this one a run though on macOS in the morning.

I'm going to test this one now, stacked on top of the final macOS-working version of D26698. Tell me now if you want it tested independently of D26698.

beanz accepted this revision.Nov 16 2016, 3:07 PM
beanz edited edge metadata.

LGTM!

The big thing to be aware of about Twines is that they are designed so that when you construct one the underlying string storage can vanish after the Twine goes out of scope. Here it looks like you're really just allowing some functions to take Twines, it doesn't look like you're constructing any, so it seems all good to me.

This revision is now accepted and ready to land.Nov 16 2016, 3:07 PM
tfiala accepted this revision.Nov 16 2016, 4:15 PM
tfiala edited edge metadata.

LGTM! All tests passed on macOS 10.12.2 public beta with Xcode 8.1.

This revision was automatically updated to reflect the committed changes.