[llvm] r314480 - [llvm-rc] Import all make_unique invocations from llvm namespace.
Marek Sokolowski via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 17:33:57 PDT 2017
Author: mnbvmar
Date: Thu Sep 28 17:33:57 2017
New Revision: 314480
URL: http://llvm.org/viewvc/llvm-project?rev=314480&view=rev
Log:
[llvm-rc] Import all make_unique invocations from llvm namespace.
Previous patch fixed one of LLVM buildbots (lld-x86_64-win7).
However, some others have already been failing because of make_unique
compilation error (llvm-clang-x86_64-expensive-checks-win).
Modified:
llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp
Modified: llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp?rev=314480&r1=314479&r2=314480&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp (original)
+++ llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp Thu Sep 28 17:33:57 2017
@@ -365,7 +365,8 @@ RCParser::ParseType RCParser::parseAccel
ASSIGN_OR_RETURN(OptStatements, parseOptionalStatements());
RETURN_IF_ERROR(consumeType(Kind::BlockBegin));
- auto Accels = make_unique<AcceleratorsResource>(std::move(*OptStatements));
+ auto Accels =
+ llvm::make_unique<AcceleratorsResource>(std::move(*OptStatements));
while (!consumeOptionalType(Kind::BlockEnd)) {
ASSIGN_OR_RETURN(EventResult, readIntOrString());
@@ -381,7 +382,7 @@ RCParser::ParseType RCParser::parseAccel
RCParser::ParseType RCParser::parseCursorResource() {
ASSIGN_OR_RETURN(Arg, readString());
- return make_unique<CursorResource>(*Arg);
+ return llvm::make_unique<CursorResource>(*Arg);
}
RCParser::ParseType RCParser::parseDialogResource(bool IsExtended) {
@@ -404,7 +405,7 @@ RCParser::ParseType RCParser::parseDialo
"parseOptionalStatements, when successful, halts on BlockBegin.");
consume();
- auto Dialog = make_unique<DialogResource>(
+ auto Dialog = llvm::make_unique<DialogResource>(
(*LocResult)[0], (*LocResult)[1], (*LocResult)[2], (*LocResult)[3],
HelpID, std::move(*OptStatements), IsExtended);
@@ -422,7 +423,7 @@ RCParser::ParseType RCParser::parseUserD
// Check if this is a file resource.
if (look().kind() == Kind::String)
- return make_unique<UserDefinedResource>(Type, read().value());
+ return llvm::make_unique<UserDefinedResource>(Type, read().value());
RETURN_IF_ERROR(consumeType(Kind::BlockBegin));
std::vector<IntOrString> Data;
@@ -438,7 +439,7 @@ RCParser::ParseType RCParser::parseUserD
Data.push_back(*Item);
}
- return make_unique<UserDefinedResource>(Type, std::move(Data));
+ return llvm::make_unique<UserDefinedResource>(Type, std::move(Data));
}
RCParser::ParseType RCParser::parseVersionInfoResource() {
@@ -480,19 +481,19 @@ Expected<Control> RCParser::parseControl
RCParser::ParseType RCParser::parseIconResource() {
ASSIGN_OR_RETURN(Arg, readString());
- return make_unique<IconResource>(*Arg);
+ return llvm::make_unique<IconResource>(*Arg);
}
RCParser::ParseType RCParser::parseHTMLResource() {
ASSIGN_OR_RETURN(Arg, readString());
- return make_unique<HTMLResource>(*Arg);
+ return llvm::make_unique<HTMLResource>(*Arg);
}
RCParser::ParseType RCParser::parseMenuResource() {
ASSIGN_OR_RETURN(OptStatements, parseOptionalStatements());
ASSIGN_OR_RETURN(Items, parseMenuItemsList());
- return make_unique<MenuResource>(std::move(*OptStatements),
- std::move(*Items));
+ return llvm::make_unique<MenuResource>(std::move(*OptStatements),
+ std::move(*Items));
}
Expected<MenuDefinitionList> RCParser::parseMenuItemsList() {
@@ -516,7 +517,7 @@ Expected<MenuDefinitionList> RCParser::p
// Now, expecting SEPARATOR.
ASSIGN_OR_RETURN(SeparatorResult, readIdentifier());
if (SeparatorResult->equals_lower("SEPARATOR")) {
- List.addDefinition(make_unique<MenuSeparator>());
+ List.addDefinition(llvm::make_unique<MenuSeparator>());
continue;
}
@@ -540,14 +541,14 @@ Expected<MenuDefinitionList> RCParser::p
if (IsPopup) {
// If POPUP, read submenu items recursively.
ASSIGN_OR_RETURN(SubMenuResult, parseMenuItemsList());
- List.addDefinition(make_unique<PopupItem>(*CaptionResult, *FlagsResult,
- std::move(*SubMenuResult)));
+ List.addDefinition(llvm::make_unique<PopupItem>(
+ *CaptionResult, *FlagsResult, std::move(*SubMenuResult)));
continue;
}
assert(IsMenuItem);
List.addDefinition(
- make_unique<MenuItem>(*CaptionResult, MenuResult, *FlagsResult));
+ llvm::make_unique<MenuItem>(*CaptionResult, MenuResult, *FlagsResult));
}
return std::move(List);
@@ -557,7 +558,8 @@ RCParser::ParseType RCParser::parseStrin
ASSIGN_OR_RETURN(OptStatements, parseOptionalStatements());
RETURN_IF_ERROR(consumeType(Kind::BlockBegin));
- auto Table = make_unique<StringTableResource>(std::move(*OptStatements));
+ auto Table =
+ llvm::make_unique<StringTableResource>(std::move(*OptStatements));
// Read strings until we reach the end of the block.
while (!consumeOptionalType(Kind::BlockEnd)) {
@@ -640,34 +642,34 @@ RCParser::parseVersionInfoFixed() {
RCParser::ParseOptionType RCParser::parseLanguageStmt() {
ASSIGN_OR_RETURN(Args, readIntsWithCommas(/* min = */ 2, /* max = */ 2));
- return make_unique<LanguageResource>((*Args)[0], (*Args)[1]);
+ return llvm::make_unique<LanguageResource>((*Args)[0], (*Args)[1]);
}
RCParser::ParseOptionType RCParser::parseCharacteristicsStmt() {
ASSIGN_OR_RETURN(Arg, readInt());
- return make_unique<CharacteristicsStmt>(*Arg);
+ return llvm::make_unique<CharacteristicsStmt>(*Arg);
}
RCParser::ParseOptionType RCParser::parseVersionStmt() {
ASSIGN_OR_RETURN(Arg, readInt());
- return make_unique<VersionStmt>(*Arg);
+ return llvm::make_unique<VersionStmt>(*Arg);
}
RCParser::ParseOptionType RCParser::parseCaptionStmt() {
ASSIGN_OR_RETURN(Arg, readString());
- return make_unique<CaptionStmt>(*Arg);
+ return llvm::make_unique<CaptionStmt>(*Arg);
}
RCParser::ParseOptionType RCParser::parseFontStmt() {
ASSIGN_OR_RETURN(SizeResult, readInt());
RETURN_IF_ERROR(consumeType(Kind::Comma));
ASSIGN_OR_RETURN(NameResult, readString());
- return make_unique<FontStmt>(*SizeResult, *NameResult);
+ return llvm::make_unique<FontStmt>(*SizeResult, *NameResult);
}
RCParser::ParseOptionType RCParser::parseStyleStmt() {
ASSIGN_OR_RETURN(Arg, readInt());
- return make_unique<StyleStmt>(*Arg);
+ return llvm::make_unique<StyleStmt>(*Arg);
}
Error RCParser::getExpectedError(const Twine Message, bool IsAlreadyRead) {
More information about the llvm-commits
mailing list