From: Hans Wennborg Date: Sun, 30 Nov 2014 00:24:43 +0000 (+0000) Subject: Speculatively qualify some llvm::make_unique calls trying to please MSVC X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=45f731aead309484805d7da0377338bc20448daf;ds=sidebyside Speculatively qualify some llvm::make_unique calls trying to please MSVC It was failing with this kind of error: C:\b\build\slave\CrWinClang\build\src\third_party\llvm\lib\TableGen\TGParser.cpp(1243) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function C:\b\build\slave\CrWinClang\build\src\third_party\llvm\include\llvm/ADT/STLExtras.h(408): could be 'std::unique_ptr> llvm::make_unique(std::string &&,llvm::SMLoc &,llvm::RecordKeeper &,bool &&)' with [ _Ty=llvm::Record ] C:\b\depot_tools\win_toolchain\vs2013_files\win8sdk\bin\..\..\VC\include\memory(1637): or 'std::unique_ptr> std::make_unique(std::string &&,llvm::SMLoc &,llvm::RecordKeeper &,bool &&)' [found using argument-dependent lookup] with [ _Ty=llvm::Record ] while trying to match the argument list '(std::string, llvm::SMLoc, llvm::RecordKeeper, bool)' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222967 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index fbb4184e6b3..cef7f96b24c 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -1239,8 +1239,8 @@ Init *TGParser::ParseSimpleValue(Record *CurRec, RecTy *ItemType, SMLoc EndLoc = Lex.getLoc(); // Create the new record, set it as CurRec temporarily. - auto NewRecOwner = make_unique(GetNewAnonymousName(), NameLoc, - Records, /*IsAnonymous=*/true); + auto NewRecOwner = llvm::make_unique(GetNewAnonymousName(), NameLoc, + Records, /*IsAnonymous=*/true); Record *NewRec = NewRecOwner.get(); // Keep a copy since we may release. SubClassReference SCRef; SCRef.RefRange = SMRange(NameLoc, EndLoc); @@ -2033,8 +2033,8 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) { if (Name) CurRecOwner = make_unique(Name, DefLoc, Records); else - CurRecOwner = make_unique(GetNewAnonymousName(), DefLoc, Records, - /*IsAnonymous=*/true); + CurRecOwner = llvm::make_unique(GetNewAnonymousName(), DefLoc, + Records, /*IsAnonymous=*/true); Record *CurRec = CurRecOwner.get(); // Keep a copy since we may release. if (!CurMultiClass && Loops.empty()) {