Update test and CIndex to use -FOO BAR form for -{remap-file,code-completion-at}.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90416 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Misc/remap-file.c b/test/Misc/remap-file.c
index da10590..f12fe95 100644
--- a/test/Misc/remap-file.c
+++ b/test/Misc/remap-file.c
@@ -1,6 +1,6 @@
-// RUN: clang-cc -remap-file="%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s
-// RUN: clang-cc -remap-file="%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s
-// RUN: clang-cc -remap-file="%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file="%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s
+// RUN: clang-cc -remap-file "%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s
+// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s
+// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file "%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s
// CHECK-EXIST: remap-file.c:1:28: warning: incompatible pointer types
// CHECK-NONEXIST: nonexistent.c:1:28: warning: incompatible pointer types
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 8ef9fb5..432f4a0 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -1211,13 +1211,14 @@
// Add the appropriate '-code-completion-at=file:line:column' argument
// to perform code completion, with an "-Xclang" preceding it.
std::string code_complete_at;
- code_complete_at += "-code-completion-at=";
code_complete_at += complete_filename;
code_complete_at += ":";
code_complete_at += llvm::utostr(complete_line);
code_complete_at += ":";
code_complete_at += llvm::utostr(complete_column);
argv.push_back("-Xclang");
+ argv.push_back("-code-completion-at");
+ argv.push_back("-Xclang");
argv.push_back(code_complete_at.c_str());
argv.push_back("-Xclang");
argv.push_back("-no-code-completion-debug-printer");
@@ -1242,11 +1243,12 @@
}
// Remap the file.
- std::string RemapArg = "-remap-file=";
- RemapArg += unsaved_files[i].Filename;
+ std::string RemapArg = unsaved_files[i].Filename;
RemapArg += ';';
RemapArg += tmpFileName;
RemapArgs.push_back("-Xclang");
+ RemapArgs.push_back("-remap-file");
+ RemapArgs.push_back("-Xclang");
RemapArgs.push_back(RemapArg);
TemporaryFiles.push_back(SavedFile);
}