From: Rui Ueyama Date: Thu, 10 Jul 2014 21:55:28 +0000 (+0000) Subject: [PECOFF] s/context/ctx/ for consistency. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aea2bcf5590523a02e6cc2ef5229e80cd5c2116a;p=platform%2Fupstream%2Fllvm.git [PECOFF] s/context/ctx/ for consistency. llvm-svn: 212766 --- diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index d97d9df..e96c030 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -608,7 +608,7 @@ handleFailIfMismatchOption(StringRef option, // Process "LINK" environment variable. If defined, the value of the variable // should be processed as command line arguments. -static std::vector processLinkEnv(PECOFFLinkingContext &context, +static std::vector processLinkEnv(PECOFFLinkingContext &ctx, int argc, const char **argv) { std::vector ret; // The first argument is the name of the command. This should stay at the head @@ -620,7 +620,7 @@ static std::vector processLinkEnv(PECOFFLinkingContext &context, llvm::Optional 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 processLinkEnv(PECOFFLinkingContext &context, // 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 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, const char **argv, raw_ostream &diag) { if (maybeRunLibCommand(argc, argv, diag)) return true; - PECOFFLinkingContext context; - std::vector newargv = processLinkEnv(context, argc, argv); - processLibEnv(context); - if (!parse(newargv.size() - 1, &newargv[0], context, diag)) + PECOFFLinkingContext ctx; + std::vector 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[],