[PATCH] D56130: Extend Module::getOrInsertGlobal to also take the default arguments accepted by the GlobalVariable constructor.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 29 15:43:03 PST 2018
chandlerc added a comment.
In D56130#1342472 <https://reviews.llvm.org/D56130#1342472>, @chandlerc wrote:
> In D56130#1342467 <https://reviews.llvm.org/D56130#1342467>, @philip.pfaffe wrote:
>
> > That solves the default case, but I feel like the new three-argument case is still not much better than getGlobalVariable and an if.
>
>
> Yeah, it just makes it clear where any future changes like a mutex
... Would go.
And it factors the if a bit into common code.
(Also, phone typing is ... Tricky.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56130/new/
https://reviews.llvm.org/D56130
More information about the llvm-commits
mailing list