diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
| commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
| tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /tools/libclang/CXCompilationDatabase.cpp | |
| parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) | |
Notes
Diffstat (limited to 'tools/libclang/CXCompilationDatabase.cpp')
| -rw-r--r-- | tools/libclang/CXCompilationDatabase.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/libclang/CXCompilationDatabase.cpp b/tools/libclang/CXCompilationDatabase.cpp index 1e4a2cd44aabb..82498bf54c749 100644 --- a/tools/libclang/CXCompilationDatabase.cpp +++ b/tools/libclang/CXCompilationDatabase.cpp @@ -111,6 +111,16 @@ clang_CompileCommand_getDirectory(CXCompileCommand CCmd) return cxstring::createRef(cmd->Directory.c_str()); } +CXString +clang_CompileCommand_getFilename(CXCompileCommand CCmd) +{ + if (!CCmd) + return cxstring::createNull(); + + CompileCommand *cmd = static_cast<CompileCommand *>(CCmd); + return cxstring::createRef(cmd->Filename.c_str()); +} + unsigned clang_CompileCommand_getNumArgs(CXCompileCommand CCmd) { |
