[lld] r212766 - [PECOFF] s/context/ctx/ for consistency.
Rui Ueyama
ruiu at google.com
Thu Jul 10 14:55:28 PDT 2014
Author: ruiu
Date: Thu Jul 10 16:55:28 2014
New Revision: 212766
URL: http://llvm.org/viewvc/llvm-project?rev=212766&view=rev
Log:
[PECOFF] s/context/ctx/ for consistency.
Modified:
lld/trunk/lib/Driver/WinLinkDriver.cpp
Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=212766&r1=212765&r2=212766&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Thu Jul 10 16:55:28 2014
@@ -608,7 +608,7 @@ handleFailIfMismatchOption(StringRef opt
// Process "LINK" environment variable. If defined, the value of the variable
// should be processed as command line arguments.
-static std::vector<const char *> processLinkEnv(PECOFFLinkingContext &context,
+static std::vector<const char *> processLinkEnv(PECOFFLinkingContext &ctx,
int argc, const char **argv) {
std::vector<const char *> ret;
// The first argument is the name of the command. This should stay at the head
@@ -620,7 +620,7 @@ static std::vector<const char *> process
llvm::Optional<std::string> env = llvm::sys::Process::GetEnv("LINK");
if (env.hasValue())
for (std::string &arg : splitArgList(*env))
- ret.push_back(context.allocate(arg).data());
+ ret.push_back(ctx.allocate(arg).data());
// Add the rest of arguments passed via the command line.
for (int i = 1; i < argc; ++i)
@@ -631,11 +631,11 @@ static std::vector<const char *> process
// Process "LIB" environment variable. The variable contains a list of search
// paths separated by semicolons.
-static void processLibEnv(PECOFFLinkingContext &context) {
+static void processLibEnv(PECOFFLinkingContext &ctx) {
llvm::Optional<std::string> env = llvm::sys::Process::GetEnv("LIB");
if (env.hasValue())
for (StringRef path : splitPathList(*env))
- context.appendInputSearchPath(context.allocate(path));
+ ctx.appendInputSearchPath(ctx.allocate(path));
}
// Returns a default entry point symbol name depending on context image type and
@@ -804,25 +804,25 @@ bool WinLinkDriver::linkPECOFF(int argc,
if (maybeRunLibCommand(argc, argv, diag))
return true;
- PECOFFLinkingContext context;
- std::vector<const char *> newargv = processLinkEnv(context, argc, argv);
- processLibEnv(context);
- if (!parse(newargv.size() - 1, &newargv[0], context, diag))
+ PECOFFLinkingContext ctx;
+ std::vector<const char *> newargv = processLinkEnv(ctx, argc, argv);
+ processLibEnv(ctx);
+ if (!parse(newargv.size() - 1, &newargv[0], ctx, diag))
return false;
// Create the file if needed.
- if (context.getCreateManifest() && !context.getEmbedManifest())
- if (!createSideBySideManifestFile(context, diag))
+ if (ctx.getCreateManifest() && !ctx.getEmbedManifest())
+ if (!createSideBySideManifestFile(ctx, diag))
return false;
// Register possible input file parsers.
- context.registry().addSupportCOFFObjects(context);
- context.registry().addSupportCOFFImportLibraries();
- context.registry().addSupportArchives(context.logInputFiles());
- context.registry().addSupportNativeObjects();
- context.registry().addSupportYamlFiles();
+ ctx.registry().addSupportCOFFObjects(ctx);
+ ctx.registry().addSupportCOFFImportLibraries();
+ ctx.registry().addSupportArchives(ctx.logInputFiles());
+ ctx.registry().addSupportNativeObjects();
+ ctx.registry().addSupportYamlFiles();
- return link(context, diag);
+ return link(ctx, diag);
}
bool WinLinkDriver::parse(int argc, const char *argv[],
More information about the llvm-commits
mailing list