|
46 | 46 | #include <llvm/ADT/SmallString.h>
|
47 | 47 | #include <llvm/Support/FileSystem.h>
|
48 | 48 | #include <llvm/Support/Path.h>
|
| 49 | +#include <llvm/Support/Process.h> |
49 | 50 | #include <llvm/Support/raw_ostream.h>
|
50 | 51 |
|
51 | 52 | #include "compat.h"
|
@@ -349,7 +350,7 @@ bool Annotator::generate(clang::Sema &Sema, bool WasInDatabase)
|
349 | 350 | auto refFilename = it.first;
|
350 | 351 | replace_invalid_filename_chars(refFilename);
|
351 | 352 |
|
352 |
| - std::string filename = projectManager.outputPrefix % "/refs/" % refFilename; |
| 353 | + std::string filename = projectManager.outputPrefix % "/refs/" % refFilename % mp_suffix; |
353 | 354 | #if CLANG_VERSION_MAJOR == 3 && CLANG_VERSION_MINOR <= 5
|
354 | 355 | std::string error;
|
355 | 356 | llvm::raw_fd_ostream myfile(filename.c_str(), error, llvm::sys::fs::F_Append);
|
@@ -516,7 +517,8 @@ bool Annotator::generate(clang::Sema &Sema, bool WasInDatabase)
|
516 | 517 | '\0' };
|
517 | 518 | llvm::StringRef idxRef(idx, 3); // include the '\0' on purpose
|
518 | 519 | if (saved.find(idxRef) == std::string::npos) {
|
519 |
| - std::string funcIndexFN = projectManager.outputPrefix % "/fnSearch/" % idx; |
| 520 | + std::string funcIndexFN = |
| 521 | + projectManager.outputPrefix % "/fnSearch/" % idx % mp_suffix; |
520 | 522 | #if CLANG_VERSION_MAJOR == 3 && CLANG_VERSION_MINOR <= 5
|
521 | 523 | std::string error;
|
522 | 524 | llvm::raw_fd_ostream funcIndexFile(funcIndexFN.c_str(), error,
|
@@ -935,7 +937,8 @@ void Annotator::registerMacro(const std::string &ref, clang::SourceLocation refL
|
935 | 937 | }
|
936 | 938 | }
|
937 | 939 |
|
938 |
| -void Annotator::annotateSourceRange(clang::SourceRange range, std::string tag, std::string attributes) |
| 940 | +void Annotator::annotateSourceRange(clang::SourceRange range, std::string tag, |
| 941 | + std::string attributes) |
939 | 942 | {
|
940 | 943 | clang::SourceManager &sm = getSourceMgr();
|
941 | 944 | if (!range.getBegin().isFileID()) {
|
|
0 commit comments