diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-12-05 20:13:27 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-12-05 20:13:27 +0000 |
commit | 5899e8916bc49c8938e510ce092cb9d1e9a5228b (patch) | |
tree | 40c907e1f6de01e50d6ac4fce65e2b7627d9719b /clang/tools/c-index-test | |
parent | 79d55f5c1f9b268b57d481c022463105e04d3c9d (diff) | |
download | bcm5719-llvm-5899e8916bc49c8938e510ce092cb9d1e9a5228b.tar.gz bcm5719-llvm-5899e8916bc49c8938e510ce092cb9d1e9a5228b.zip |
[c-index-test] For the '-remap-file' option use a comma for separator which is more
Windows friendly than the colon.
llvm-svn: 196529
Diffstat (limited to 'clang/tools/c-index-test')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 40794308065..39cdcc149ee 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -142,10 +142,10 @@ static int parse_remapped_files_with_opt(const char *opt_name, char *filename; char *contents; FILE *to_file; - const char *colon = strchr(arg_string, ':'); - if (!colon) { + const char *sep = strchr(arg_string, ','); + if (!sep) { fprintf(stderr, - "error: %sfrom:to argument is missing semicolon\n", opt_name); + "error: %sfrom:to argument is missing comma\n", opt_name); free_remapped_files(*unsaved_files, i); *unsaved_files = 0; *num_unsaved_files = 0; @@ -153,10 +153,10 @@ static int parse_remapped_files_with_opt(const char *opt_name, } /* Open the file that we're remapping to. */ - to_file = fopen(colon + 1, "rb"); + to_file = fopen(sep + 1, "rb"); if (!to_file) { fprintf(stderr, "error: cannot open file %s that we are remapping to\n", - colon + 1); + sep + 1); free_remapped_files(*unsaved_files, i); *unsaved_files = 0; *num_unsaved_files = 0; @@ -172,7 +172,7 @@ static int parse_remapped_files_with_opt(const char *opt_name, contents = (char *)malloc(unsaved->Length + 1); if (fread(contents, 1, unsaved->Length, to_file) != unsaved->Length) { fprintf(stderr, "error: unexpected %s reading 'to' file %s\n", - (feof(to_file) ? "EOF" : "error"), colon + 1); + (feof(to_file) ? "EOF" : "error"), sep + 1); fclose(to_file); free_remapped_files(*unsaved_files, i); free(contents); @@ -187,7 +187,7 @@ static int parse_remapped_files_with_opt(const char *opt_name, fclose(to_file); /* Copy the file name that we're remapping from. */ - filename_len = colon - arg_string; + filename_len = sep - arg_string; filename = (char *)malloc(filename_len + 1); memcpy(filename, arg_string, filename_len); filename[filename_len] = 0; |