Skip to content

Commit aea2bcf

Browse files
committed
[PECOFF] s/context/ctx/ for consistency.
llvm-svn: 212766
1 parent 8cb0f1e commit aea2bcf

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

lld/lib/Driver/WinLinkDriver.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ handleFailIfMismatchOption(StringRef option,
608608

609609
// Process "LINK" environment variable. If defined, the value of the variable
610610
// should be processed as command line arguments.
611-
static std::vector<const char *> processLinkEnv(PECOFFLinkingContext &context,
611+
static std::vector<const char *> processLinkEnv(PECOFFLinkingContext &ctx,
612612
int argc, const char **argv) {
613613
std::vector<const char *> ret;
614614
// The first argument is the name of the command. This should stay at the head
@@ -620,7 +620,7 @@ static std::vector<const char *> processLinkEnv(PECOFFLinkingContext &context,
620620
llvm::Optional<std::string> env = llvm::sys::Process::GetEnv("LINK");
621621
if (env.hasValue())
622622
for (std::string &arg : splitArgList(*env))
623-
ret.push_back(context.allocate(arg).data());
623+
ret.push_back(ctx.allocate(arg).data());
624624

625625
// Add the rest of arguments passed via the command line.
626626
for (int i = 1; i < argc; ++i)
@@ -631,11 +631,11 @@ static std::vector<const char *> processLinkEnv(PECOFFLinkingContext &context,
631631

632632
// Process "LIB" environment variable. The variable contains a list of search
633633
// paths separated by semicolons.
634-
static void processLibEnv(PECOFFLinkingContext &context) {
634+
static void processLibEnv(PECOFFLinkingContext &ctx) {
635635
llvm::Optional<std::string> env = llvm::sys::Process::GetEnv("LIB");
636636
if (env.hasValue())
637637
for (StringRef path : splitPathList(*env))
638-
context.appendInputSearchPath(context.allocate(path));
638+
ctx.appendInputSearchPath(ctx.allocate(path));
639639
}
640640

641641
// Returns a default entry point symbol name depending on context image type and
@@ -804,25 +804,25 @@ bool WinLinkDriver::linkPECOFF(int argc, const char **argv, raw_ostream &diag) {
804804
if (maybeRunLibCommand(argc, argv, diag))
805805
return true;
806806

807-
PECOFFLinkingContext context;
808-
std::vector<const char *> newargv = processLinkEnv(context, argc, argv);
809-
processLibEnv(context);
810-
if (!parse(newargv.size() - 1, &newargv[0], context, diag))
807+
PECOFFLinkingContext ctx;
808+
std::vector<const char *> newargv = processLinkEnv(ctx, argc, argv);
809+
processLibEnv(ctx);
810+
if (!parse(newargv.size() - 1, &newargv[0], ctx, diag))
811811
return false;
812812

813813
// Create the file if needed.
814-
if (context.getCreateManifest() && !context.getEmbedManifest())
815-
if (!createSideBySideManifestFile(context, diag))
814+
if (ctx.getCreateManifest() && !ctx.getEmbedManifest())
815+
if (!createSideBySideManifestFile(ctx, diag))
816816
return false;
817817

818818
// Register possible input file parsers.
819-
context.registry().addSupportCOFFObjects(context);
820-
context.registry().addSupportCOFFImportLibraries();
821-
context.registry().addSupportArchives(context.logInputFiles());
822-
context.registry().addSupportNativeObjects();
823-
context.registry().addSupportYamlFiles();
819+
ctx.registry().addSupportCOFFObjects(ctx);
820+
ctx.registry().addSupportCOFFImportLibraries();
821+
ctx.registry().addSupportArchives(ctx.logInputFiles());
822+
ctx.registry().addSupportNativeObjects();
823+
ctx.registry().addSupportYamlFiles();
824824

825-
return link(context, diag);
825+
return link(ctx, diag);
826826
}
827827

828828
bool WinLinkDriver::parse(int argc, const char *argv[],

0 commit comments

Comments
 (0)