@@ -608,7 +608,7 @@ handleFailIfMismatchOption(StringRef option,
608
608
609
609
// Process "LINK" environment variable. If defined, the value of the variable
610
610
// 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 ,
612
612
int argc, const char **argv) {
613
613
std::vector<const char *> ret;
614
614
// 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,
620
620
llvm::Optional<std::string> env = llvm::sys::Process::GetEnv (" LINK" );
621
621
if (env.hasValue ())
622
622
for (std::string &arg : splitArgList (*env))
623
- ret.push_back (context .allocate (arg).data ());
623
+ ret.push_back (ctx .allocate (arg).data ());
624
624
625
625
// Add the rest of arguments passed via the command line.
626
626
for (int i = 1 ; i < argc; ++i)
@@ -631,11 +631,11 @@ static std::vector<const char *> processLinkEnv(PECOFFLinkingContext &context,
631
631
632
632
// Process "LIB" environment variable. The variable contains a list of search
633
633
// paths separated by semicolons.
634
- static void processLibEnv (PECOFFLinkingContext &context ) {
634
+ static void processLibEnv (PECOFFLinkingContext &ctx ) {
635
635
llvm::Optional<std::string> env = llvm::sys::Process::GetEnv (" LIB" );
636
636
if (env.hasValue ())
637
637
for (StringRef path : splitPathList (*env))
638
- context .appendInputSearchPath (context .allocate (path));
638
+ ctx .appendInputSearchPath (ctx .allocate (path));
639
639
}
640
640
641
641
// 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) {
804
804
if (maybeRunLibCommand (argc, argv, diag))
805
805
return true ;
806
806
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))
811
811
return false ;
812
812
813
813
// 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))
816
816
return false ;
817
817
818
818
// 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 ();
824
824
825
- return link (context , diag);
825
+ return link (ctx , diag);
826
826
}
827
827
828
828
bool WinLinkDriver::parse (int argc, const char *argv[],
0 commit comments