summaryrefslogtreecommitdiff
path: root/tools/libclang/CXCompilationDatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/CXCompilationDatabase.cpp')
-rw-r--r--tools/libclang/CXCompilationDatabase.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/tools/libclang/CXCompilationDatabase.cpp b/tools/libclang/CXCompilationDatabase.cpp
index c122ec8a6db4e..2ca532659d378 100644
--- a/tools/libclang/CXCompilationDatabase.cpp
+++ b/tools/libclang/CXCompilationDatabase.cpp
@@ -145,36 +145,23 @@ clang_CompileCommand_getArg(CXCompileCommand CCmd, unsigned Arg)
unsigned
clang_CompileCommand_getNumMappedSources(CXCompileCommand CCmd)
{
- if (!CCmd)
- return 0;
-
- return static_cast<CompileCommand *>(CCmd)->MappedSources.size();
+ // Left here for backward compatibility. No mapped sources exists in the C++
+ // backend anymore.
+ return 0;
}
CXString
clang_CompileCommand_getMappedSourcePath(CXCompileCommand CCmd, unsigned I)
{
- if (!CCmd)
- return cxstring::createNull();
-
- CompileCommand *Cmd = static_cast<CompileCommand *>(CCmd);
-
- if (I >= Cmd->MappedSources.size())
- return cxstring::createNull();
-
- return cxstring::createRef(Cmd->MappedSources[I].first.c_str());
+ // Left here for backward compatibility. No mapped sources exists in the C++
+ // backend anymore.
+ return cxstring::createNull();
}
CXString
clang_CompileCommand_getMappedSourceContent(CXCompileCommand CCmd, unsigned I)
{
- if (!CCmd)
- return cxstring::createNull();
-
- CompileCommand *Cmd = static_cast<CompileCommand *>(CCmd);
-
- if (I >= Cmd->MappedSources.size())
- return cxstring::createNull();
-
- return cxstring::createRef(Cmd->MappedSources[I].second.c_str());
+ // Left here for backward compatibility. No mapped sources exists in the C++
+ // backend anymore.
+ return cxstring::createNull();
}