diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2015-02-16 18:21:19 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2015-02-16 18:21:19 +0000 |
commit | f17583ee9c0283443c75a134aeb75b2caf97ad57 (patch) | |
tree | 408a76f2c5e074c9f540ade0aa61dd49cb626346 /llvm/lib/CodeGen/LexicalScopes.cpp | |
parent | 05938a548139554dbc5bd44c9837da5f412ab85c (diff) | |
download | bcm5719-llvm-f17583ee9c0283443c75a134aeb75b2caf97ad57.tar.gz bcm5719-llvm-f17583ee9c0283443c75a134aeb75b2caf97ad57.zip |
MSVC 2013 supports std::forward_as_tuple, while MSVC 2012 did not; so we can move to using the improved API.
llvm-svn: 229414
Diffstat (limited to 'llvm/lib/CodeGen/LexicalScopes.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LexicalScopes.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp index b621e3baee5..d71b0afdaec 100644 --- a/llvm/lib/CodeGen/LexicalScopes.cpp +++ b/llvm/lib/CodeGen/LexicalScopes.cpp @@ -168,11 +168,10 @@ LexicalScope *LexicalScopes::getOrCreateRegularScope(MDNode *Scope) { 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::getOrCreateInlinedScope(MDNode *ScopeNode, 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; } |