This is an archive of the discontinued LLVM Phabricator instance.

Make llvm::call_once more convenient to reuse out of LLVM
ClosedPublic

Authored by krytarowski on Jan 30 2017, 12:25 PM.

Details

Summary

Currently users need to set call using namespace llvm;, with this change it's no longer needed.

Sponsored by <The NetBSD Foundation>

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Jan 30 2017, 12:25 PM

Related review: D29288

joerg edited edge metadata.Jan 30 2017, 12:32 PM

If we want to make this namespace aware, I wonder if we shouldn't also be explicitly and use ::llvm::once_flag etc. But in general, LGTM.

clayborg edited edge metadata.Jan 30 2017, 12:43 PM

LGTM, but I will let other LLVM folks give it the final approval.

The idea of this seems fine as-is, but it should be clang-formatted to fit in 80 columns.

krytarowski updated this revision to Diff 86740.Feb 1 2017, 3:32 PM

Break line to fit the 80-cols limit.

mehdi_amini edited edge metadata.Feb 2 2017, 8:13 AM

LGTM.

I'd go with @joerg suggestion though (but you don't need to submit another patch, just go ahead and commit).

mehdi_amini accepted this revision.Feb 2 2017, 8:14 AM
This revision is now accepted and ready to land.Feb 2 2017, 8:14 AM
krytarowski updated this revision to Diff 86818.Feb 2 2017, 8:16 AM

Use ::lvm namespace.

krytarowski closed this revision.Feb 2 2017, 8:17 AM