[llvm] r229414 - MSVC 2013 supports std::forward_as_tuple, while MSVC 2012 did not; so we can move to using the improved API.
David Blaikie
dblaikie at gmail.com
Mon Feb 16 12:02:22 PST 2015
On Mon, Feb 16, 2015 at 10:21 AM, Aaron Ballman <aaron at aaronballman.com>
wrote:
> Author: aaronballman
> Date: Mon Feb 16 12:21:19 2015
> New Revision: 229414
>
> URL: http://llvm.org/viewvc/llvm-project?rev=229414&view=rev
> Log:
> MSVC 2013 supports std::forward_as_tuple, while MSVC 2012 did not; so we
> can move to using the improved API.
>
Heh, thanks! That one made me sad.
>
> Modified:
> llvm/trunk/lib/CodeGen/LexicalScopes.cpp
>
> Modified: llvm/trunk/lib/CodeGen/LexicalScopes.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LexicalScopes.cpp?rev=229414&r1=229413&r2=229414&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LexicalScopes.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LexicalScopes.cpp Mon Feb 16 12:21:19 2015
> @@ -168,11 +168,10 @@ LexicalScope *LexicalScopes::getOrCreate
> LexicalScope *Parent = nullptr;
> if (D.isLexicalBlock())
> Parent =
> getOrCreateLexicalScope(DebugLoc::getFromDILexicalBlock(Scope));
> - // FIXME: Use forward_as_tuple instead of make_tuple, once MSVC2012
> - // compatibility is no longer required.
> - I = LexicalScopeMap.emplace(std::piecewise_construct,
> std::make_tuple(Scope),
> - std::make_tuple(Parent, DIDescriptor(Scope),
> - nullptr, false)).first;
> + I = LexicalScopeMap.emplace(std::piecewise_construct,
> + std::forward_as_tuple(Scope),
> + std::forward_as_tuple(Parent,
> DIDescriptor(Scope),
> + nullptr,
> false)).first;
>
> if (!Parent) {
> assert(DIDescriptor(Scope).isSubprogram());
> @@ -199,12 +198,11 @@ LexicalScope *LexicalScopes::getOrCreate
> else
> Parent = getOrCreateInlinedScope(Scope.getContext(), InlinedAt);
>
> - // FIXME: Use forward_as_tuple instead of make_tuple, once MSVC2012
> - // compatibility is no longer required.
> I = InlinedLexicalScopeMap.emplace(std::piecewise_construct,
> - std::make_tuple(P),
> - std::make_tuple(Parent, Scope,
> InlinedAt,
> - false)).first;
> + std::forward_as_tuple(P),
> + std::forward_as_tuple(Parent, Scope,
> + InlinedAt,
> false))
> + .first;
> return &I->second;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150216/534595c0/attachment.html>
More information about the llvm-commits
mailing list