aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/tools/llvm-rc
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/tools/llvm-rc
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/tools/llvm-rc')
-rw-r--r--contrib/libs/llvm12/tools/llvm-rc/Opts.td50
-rw-r--r--contrib/libs/llvm12/tools/llvm-rc/ResourceFileWriter.cpp24
-rw-r--r--contrib/libs/llvm12/tools/llvm-rc/ResourceScriptParser.cpp6
-rw-r--r--contrib/libs/llvm12/tools/llvm-rc/ResourceScriptStmt.h6
-rw-r--r--contrib/libs/llvm12/tools/llvm-rc/llvm-rc.cpp26
-rw-r--r--contrib/libs/llvm12/tools/llvm-rc/ya.make14
6 files changed, 63 insertions, 63 deletions
diff --git a/contrib/libs/llvm12/tools/llvm-rc/Opts.td b/contrib/libs/llvm12/tools/llvm-rc/Opts.td
index 613f0a0db3..065fb3f7cd 100644
--- a/contrib/libs/llvm12/tools/llvm-rc/Opts.td
+++ b/contrib/libs/llvm12/tools/llvm-rc/Opts.td
@@ -4,55 +4,55 @@ include "llvm/Option/OptParser.td"
// These options seem to be important for the tool
// and should be implemented.
-def fileout : JoinedOrSeparate<[ "/", "-" ], "FO">,
+def fileout : JoinedOrSeparate<[ "/", "-" ], "FO">,
HelpText<"Change the output file location.">;
-def define : Separate<[ "/", "-" ], "D">,
+def define : Separate<[ "/", "-" ], "D">,
HelpText<"Define a symbol for the C preprocessor.">;
-def undef : Separate<[ "/", "-" ], "U">,
+def undef : Separate<[ "/", "-" ], "U">,
HelpText<"Undefine a symbol for the C preprocessor.">;
-def lang_id : JoinedOrSeparate<[ "/", "-" ], "L">,
+def lang_id : JoinedOrSeparate<[ "/", "-" ], "L">,
HelpText<"Set the default language identifier.">;
-def lang_name : Separate<[ "/", "-" ], "LN">,
+def lang_name : Separate<[ "/", "-" ], "LN">,
HelpText<"Set the default language name.">;
-def includepath : Separate<[ "/", "-" ], "I">, HelpText<"Add an include path.">;
-def noinclude : Flag<[ "/", "-" ], "X">, HelpText<"Ignore 'include' variable.">;
+def includepath : Separate<[ "/", "-" ], "I">, HelpText<"Add an include path.">;
+def noinclude : Flag<[ "/", "-" ], "X">, HelpText<"Ignore 'include' variable.">;
-def add_null : Flag<[ "/", "-" ], "N">,
+def add_null : Flag<[ "/", "-" ], "N">,
HelpText<"Null-terminate all strings in the string table.">;
-def dupid_nowarn : Flag<[ "/", "-" ], "Y">,
+def dupid_nowarn : Flag<[ "/", "-" ], "Y">,
HelpText<"Suppress warnings on duplicate resource IDs.">;
-def verbose : Flag<[ "/", "-" ], "V">, HelpText<"Be verbose.">;
-def help : Flag<[ "/", "-" ], "?">, HelpText<"Display this help and exit.">;
-def h : Flag<[ "/", "-" ], "H">,
- Alias<help>,
+def verbose : Flag<[ "/", "-" ], "V">, HelpText<"Be verbose.">;
+def help : Flag<[ "/", "-" ], "?">, HelpText<"Display this help and exit.">;
+def h : Flag<[ "/", "-" ], "H">,
+ Alias<help>,
HelpText<"Display this help and exit.">;
-def dry_run : Flag<[ "/", "-" ], "dry-run">,
+def dry_run : Flag<[ "/", "-" ], "dry-run">,
HelpText<"Don't compile the input; only try to parse it.">;
-def codepage : JoinedOrSeparate<[ "/", "-" ], "C">,
+def codepage : JoinedOrSeparate<[ "/", "-" ], "C">,
HelpText<"Set the codepage used for input strings.">;
// Unused switches (at least for now). These will stay unimplemented
// in an early stage of development and can be ignored. However, we need to
// parse them in order to preserve the compatibility with the original tool.
-def nologo : Flag<[ "/", "-" ], "NOLOGO">;
-def r : Flag<[ "/", "-" ], "R">;
-def sl : Flag<[ "/", "-" ], "SL">;
+def nologo : Flag<[ "/", "-" ], "NOLOGO">;
+def r : Flag<[ "/", "-" ], "R">;
+def sl : Flag<[ "/", "-" ], "SL">;
// (Codepages support.)
-def w : Flag<[ "/", "-" ], "W">;
+def w : Flag<[ "/", "-" ], "W">;
// (Support of MUI and similar.)
-def fm : Separate<[ "/", "-" ], "FM">;
-def q : Separate<[ "/", "-" ], "Q">;
-def g : Flag<[ "/", "-" ], "G">;
-def gn : Flag<[ "/", "-" ], "GN">;
-def g1 : Flag<[ "/", "-" ], "G1">;
-def g2 : Flag<[ "/", "-" ], "G2">;
+def fm : Separate<[ "/", "-" ], "FM">;
+def q : Separate<[ "/", "-" ], "Q">;
+def g : Flag<[ "/", "-" ], "G">;
+def gn : Flag<[ "/", "-" ], "GN">;
+def g1 : Flag<[ "/", "-" ], "G1">;
+def g2 : Flag<[ "/", "-" ], "G2">;
diff --git a/contrib/libs/llvm12/tools/llvm-rc/ResourceFileWriter.cpp b/contrib/libs/llvm12/tools/llvm-rc/ResourceFileWriter.cpp
index 553bb754ae..8b2de62cb1 100644
--- a/contrib/libs/llvm12/tools/llvm-rc/ResourceFileWriter.cpp
+++ b/contrib/libs/llvm12/tools/llvm-rc/ResourceFileWriter.cpp
@@ -138,8 +138,8 @@ enum class NullHandlingMethod {
};
// Parses an identifier or string and returns a processed version of it:
-// * Strip the string boundary quotes.
-// * Convert the input code page characters to UTF16.
+// * Strip the string boundary quotes.
+// * Convert the input code page characters to UTF16.
// * Squash "" to a single ".
// * Replace the escape sequences with their processed version.
// For identifiers, this is no-op.
@@ -1514,16 +1514,16 @@ ResourceFileWriter::loadFile(StringRef File) const {
SmallString<128> Cwd;
std::unique_ptr<MemoryBuffer> Result;
- // 0. The file path is absolute or has a root directory, so we shouldn't
- // try to append it on top of other base directories. (An absolute path
- // must have a root directory, but e.g. the path "\dir\file" on windows
- // isn't considered absolute, but it does have a root directory. As long as
- // sys::path::append doesn't handle appending an absolute path or a path
- // starting with a root directory on top of a base, we must handle this
- // case separately at the top. C++17's path::append handles that case
- // properly though, so if using that to append paths below, this early
- // exception case could be removed.)
- if (sys::path::has_root_directory(File))
+ // 0. The file path is absolute or has a root directory, so we shouldn't
+ // try to append it on top of other base directories. (An absolute path
+ // must have a root directory, but e.g. the path "\dir\file" on windows
+ // isn't considered absolute, but it does have a root directory. As long as
+ // sys::path::append doesn't handle appending an absolute path or a path
+ // starting with a root directory on top of a base, we must handle this
+ // case separately at the top. C++17's path::append handles that case
+ // properly though, so if using that to append paths below, this early
+ // exception case could be removed.)
+ if (sys::path::has_root_directory(File))
return errorOrToExpected(MemoryBuffer::getFile(File, -1, false));
// 1. The current working directory.
diff --git a/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptParser.cpp b/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptParser.cpp
index 5141ac0c38..d39665996d 100644
--- a/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptParser.cpp
+++ b/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptParser.cpp
@@ -777,10 +777,10 @@ RCParser::parseVersionInfoFixed() {
// VERSION variations take multiple integers.
size_t NumInts = RetType::isVersionType(FixedType) ? 4 : 1;
- ASSIGN_OR_RETURN(ArgsResult, readIntsWithCommas(1, NumInts));
+ ASSIGN_OR_RETURN(ArgsResult, readIntsWithCommas(1, NumInts));
SmallVector<uint32_t, 4> ArgInts(ArgsResult->begin(), ArgsResult->end());
- while (ArgInts.size() < NumInts)
- ArgInts.push_back(0);
+ while (ArgInts.size() < NumInts)
+ ArgInts.push_back(0);
Result.setValue(FixedType, ArgInts);
}
diff --git a/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptStmt.h b/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptStmt.h
index 27fbea3ae8..6102a1c51e 100644
--- a/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptStmt.h
+++ b/contrib/libs/llvm12/tools/llvm-rc/ResourceScriptStmt.h
@@ -289,9 +289,9 @@ public:
: RCResource(Flags),
OptStatements(std::make_unique<OptionalStmtList>(std::move(Stmts))) {}
- Error applyStmts(Visitor *V) const override {
- return OptStatements->visit(V);
- }
+ Error applyStmts(Visitor *V) const override {
+ return OptStatements->visit(V);
+ }
};
// LANGUAGE statement. It can occur both as a top-level statement (in such
diff --git a/contrib/libs/llvm12/tools/llvm-rc/llvm-rc.cpp b/contrib/libs/llvm12/tools/llvm-rc/llvm-rc.cpp
index e9027a21d4..415701ddac 100644
--- a/contrib/libs/llvm12/tools/llvm-rc/llvm-rc.cpp
+++ b/contrib/libs/llvm12/tools/llvm-rc/llvm-rc.cpp
@@ -92,12 +92,12 @@ int main(int Argc, const char **Argv) {
opt::InputArgList InputArgs = T.ParseArgs(ArgsArr, MAI, MAC);
// The tool prints nothing when invoked with no command-line arguments.
- if (InputArgs.hasArg(OPT_help)) {
+ if (InputArgs.hasArg(OPT_help)) {
T.PrintHelp(outs(), "rc [options] file...", "Resource Converter", false);
return 0;
}
- const bool BeVerbose = InputArgs.hasArg(OPT_verbose);
+ const bool BeVerbose = InputArgs.hasArg(OPT_verbose);
std::vector<std::string> InArgsInfo = InputArgs.getAllArgValues(OPT_INPUT);
if (DashDash != Argv + Argc)
@@ -141,14 +141,14 @@ int main(int Argc, const char **Argv) {
SmallString<128> InputFile(InArgsInfo[0]);
llvm::sys::fs::make_absolute(InputFile);
Params.InputFilePath = InputFile;
- Params.Include = InputArgs.getAllArgValues(OPT_includepath);
- Params.NoInclude = InputArgs.getAllArgValues(OPT_noinclude);
+ Params.Include = InputArgs.getAllArgValues(OPT_includepath);
+ Params.NoInclude = InputArgs.getAllArgValues(OPT_noinclude);
- if (InputArgs.hasArg(OPT_codepage)) {
- if (InputArgs.getLastArgValue(OPT_codepage)
+ if (InputArgs.hasArg(OPT_codepage)) {
+ if (InputArgs.getLastArgValue(OPT_codepage)
.getAsInteger(10, Params.CodePage))
fatalError("Invalid code page: " +
- InputArgs.getLastArgValue(OPT_codepage));
+ InputArgs.getLastArgValue(OPT_codepage));
switch (Params.CodePage) {
case CpAcp:
case CpWin1252:
@@ -161,10 +161,10 @@ int main(int Argc, const char **Argv) {
}
std::unique_ptr<ResourceFileWriter> Visitor;
- bool IsDryRun = InputArgs.hasArg(OPT_dry_run);
+ bool IsDryRun = InputArgs.hasArg(OPT_dry_run);
if (!IsDryRun) {
- auto OutArgsInfo = InputArgs.getAllArgValues(OPT_fileout);
+ auto OutArgsInfo = InputArgs.getAllArgValues(OPT_fileout);
if (OutArgsInfo.empty()) {
SmallString<128> OutputFile = InputFile;
llvm::sys::path::replace_extension(OutputFile, "res");
@@ -182,17 +182,17 @@ int main(int Argc, const char **Argv) {
fatalError("Error opening output file '" + OutArgsInfo[0] +
"': " + EC.message());
Visitor = std::make_unique<ResourceFileWriter>(Params, std::move(FOut));
- Visitor->AppendNull = InputArgs.hasArg(OPT_add_null);
+ Visitor->AppendNull = InputArgs.hasArg(OPT_add_null);
ExitOnErr(NullResource().visit(Visitor.get()));
// Set the default language; choose en-US arbitrarily.
unsigned PrimaryLangId = 0x09, SubLangId = 0x01;
- if (InputArgs.hasArg(OPT_lang_id)) {
+ if (InputArgs.hasArg(OPT_lang_id)) {
unsigned LangId;
- if (InputArgs.getLastArgValue(OPT_lang_id).getAsInteger(16, LangId))
+ if (InputArgs.getLastArgValue(OPT_lang_id).getAsInteger(16, LangId))
fatalError("Invalid language id: " +
- InputArgs.getLastArgValue(OPT_lang_id));
+ InputArgs.getLastArgValue(OPT_lang_id));
PrimaryLangId = LangId & 0x3ff;
SubLangId = LangId >> 10;
}
diff --git a/contrib/libs/llvm12/tools/llvm-rc/ya.make b/contrib/libs/llvm12/tools/llvm-rc/ya.make
index e69f41f542..b54fb969ea 100644
--- a/contrib/libs/llvm12/tools/llvm-rc/ya.make
+++ b/contrib/libs/llvm12/tools/llvm-rc/ya.make
@@ -12,16 +12,16 @@ LICENSE(Apache-2.0 WITH LLVM-exception)
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
PEERDIR(
- contrib/libs/llvm12
- contrib/libs/llvm12/include
- contrib/libs/llvm12/lib/Demangle
- contrib/libs/llvm12/lib/Option
- contrib/libs/llvm12/lib/Support
+ contrib/libs/llvm12
+ contrib/libs/llvm12/include
+ contrib/libs/llvm12/lib/Demangle
+ contrib/libs/llvm12/lib/Option
+ contrib/libs/llvm12/lib/Support
)
ADDINCL(
- ${ARCADIA_BUILD_ROOT}/contrib/libs/llvm12/tools/llvm-rc
- contrib/libs/llvm12/tools/llvm-rc
+ ${ARCADIA_BUILD_ROOT}/contrib/libs/llvm12/tools/llvm-rc
+ contrib/libs/llvm12/tools/llvm-rc
)
NO_COMPILER_WARNINGS()