aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2021-02-10 13:54:08 +0100
committerJan Svoboda <jan_svoboda@apple.com>2021-02-10 13:54:08 +0100
commita7150415ddd8e520a4fa024f07575527d445a689 (patch)
tree1c93844d3bea27eb480b575bf1972994011e8f6c /clang/lib/Frontend/CompilerInvocation.cpp
parentfa11496b618e84ce1daa53108ef87c25efaf3813 (diff)
downloadllvm-a7150415ddd8e520a4fa024f07575527d445a689.zip
llvm-a7150415ddd8e520a4fa024f07575527d445a689.tar.gz
llvm-a7150415ddd8e520a4fa024f07575527d445a689.tar.bz2
[clang][cli] Declare local variable for marshalling macros
Some Windows build bots report `FileSystemOpts` and `MigratorOpts` as undeclared. This fix renames the parameter and declares a local variable with the original name.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 52f0e50..53f90cf 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2155,9 +2155,11 @@ static bool checkVerifyPrefixes(const std::vector<std::string> &VerifyPrefixes,
return Success;
}
-static void GenerateFileSystemArgs(const FileSystemOptions &FileSystemOpts,
+static void GenerateFileSystemArgs(const FileSystemOptions &Opts,
SmallVectorImpl<const char *> &Args,
CompilerInvocation::StringAllocator SA) {
+ const FileSystemOptions &FileSystemOpts = Opts;
+
#define FILE_SYSTEM_OPTION_WITH_MARSHALLING( \
PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, \
@@ -2170,8 +2172,9 @@ static void GenerateFileSystemArgs(const FileSystemOptions &FileSystemOpts,
#undef FILE_SYSTEM_OPTION_WITH_MARSHALLING
}
-static bool ParseFileSystemArgs(FileSystemOptions &FileSystemOpts,
- const ArgList &Args, DiagnosticsEngine &Diags) {
+static bool ParseFileSystemArgs(FileSystemOptions &Opts, const ArgList &Args,
+ DiagnosticsEngine &Diags) {
+ FileSystemOptions &FileSystemOpts = Opts;
bool Success = true;
#define FILE_SYSTEM_OPTION_WITH_MARSHALLING( \
@@ -2189,9 +2192,11 @@ static bool ParseFileSystemArgs(FileSystemOptions &FileSystemOpts,
return Success;
}
-static void GenerateMigratorArgs(const MigratorOptions &MigratorOpts,
+static void GenerateMigratorArgs(const MigratorOptions &Opts,
SmallVectorImpl<const char *> &Args,
CompilerInvocation::StringAllocator SA) {
+ const MigratorOptions &MigratorOpts = Opts;
+
#define MIGRATOR_OPTION_WITH_MARSHALLING( \
PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, \
@@ -2204,8 +2209,9 @@ static void GenerateMigratorArgs(const MigratorOptions &MigratorOpts,
#undef MIGRATOR_OPTION_WITH_MARSHALLING
}
-static bool ParseMigratorArgs(MigratorOptions &MigratorOpts,
- const ArgList &Args, DiagnosticsEngine &Diags) {
+static bool ParseMigratorArgs(MigratorOptions &Opts, const ArgList &Args,
+ DiagnosticsEngine &Diags) {
+ MigratorOptions &MigratorOpts = Opts;
bool Success = true;
#define MIGRATOR_OPTION_WITH_MARSHALLING( \