diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-02-07 19:36:01 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-02-07 19:36:01 +0000 |
commit | 0210e976805795df6cbc59024f622c8e42622e55 (patch) | |
tree | 732dcb511c567baa6ef94ef21070aa26cc381d40 /llvm/lib/Support | |
parent | 6255bd14f0184b23e990ef57d652f4a63ea5d223 (diff) | |
download | bcm5719-llvm-0210e976805795df6cbc59024f622c8e42622e55.tar.gz bcm5719-llvm-0210e976805795df6cbc59024f622c8e42622e55.zip |
Correct use of const in ParseCommandLineOptions
llvm-svn: 149999
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 48827aec4c1..d1ec4b005bf 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -266,8 +266,8 @@ static bool CommaSeparateAndAddOccurence(Option *Handler, unsigned pos, /// and a null value (StringRef()). The later is accepted for arguments that /// don't allow a value (-foo) the former is rejected (-foo=). static inline bool ProvideOption(Option *Handler, StringRef ArgName, - StringRef Value, int argc, char **argv, - int &i) { + StringRef Value, int argc, + const char *const *argv, int &i) { // Is this a multi-argument option? unsigned NumAdditionalVals = Handler->getNumAdditionalVals(); @@ -495,10 +495,10 @@ void cl::ParseEnvironmentOptions(const char *progName, const char *envVar, /// ExpandResponseFiles - Copy the contents of argv into newArgv, /// substituting the contents of the response files for the arguments /// of type @file. -static void ExpandResponseFiles(unsigned argc, char** argv, +static void ExpandResponseFiles(unsigned argc, const char*const* argv, std::vector<char*>& newArgv) { for (unsigned i = 1; i != argc; ++i) { - char *arg = argv[i]; + const char *arg = argv[i]; if (arg[0] == '@') { sys::PathWithStatus respFile(++arg); @@ -528,7 +528,7 @@ static void ExpandResponseFiles(unsigned argc, char** argv, } } -void cl::ParseCommandLineOptions(int argc, char **argv, +void cl::ParseCommandLineOptions(int argc, const char * const *argv, const char *Overview, bool ReadResponseFiles) { // Process all registered options. SmallVector<Option*, 4> PositionalOpts; |