diff options
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 1e4a2cd..82498bf 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) { |