Add Bindings
This commit is contained in:
186
src/CXCompilationDatabase.bf
Normal file
186
src/CXCompilationDatabase.bf
Normal file
@@ -0,0 +1,186 @@
|
||||
// This file was auto-generated by Cpp2Beef
|
||||
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
namespace LibClang;
|
||||
|
||||
static
|
||||
{
|
||||
/*===-- clang-c/CXCompilationDatabase.h - Compilation database ---*- C -*-===*\
|
||||
|* *|
|
||||
|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
|
||||
|* Exceptions. *|
|
||||
|* See https://llvm.org/LICENSE.txt for license information. *|
|
||||
|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This header provides a public interface to use CompilationDatabase without *|
|
||||
|* the full Clang C++ API. *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** \defgroup COMPILATIONDB CompilationDatabase functions
|
||||
* \ingroup CINDEX
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* A compilation database holds all information used to compile files in a
|
||||
* project. For each file in the database, it can be queried for the working
|
||||
* directory or the command line used for the compiler invocation.
|
||||
*
|
||||
* Must be freed by \c clang_CompilationDatabase_dispose
|
||||
*/
|
||||
public struct CXCompilationDatabase : this(void* ptr);
|
||||
|
||||
/**
|
||||
* Contains the results of a search in the compilation database
|
||||
*
|
||||
* When searching for the compile command for a file, the compilation db can
|
||||
* return several commands, as the file may have been compiled with
|
||||
* different options in different places of the project. This choice of compile
|
||||
* commands is wrapped in this opaque data structure. It must be freed by
|
||||
* \c clang_CompileCommands_dispose.
|
||||
*/
|
||||
public struct CXCompileCommands : this(void* ptr);
|
||||
|
||||
/**
|
||||
* Represents the command line invocation to compile a specific file.
|
||||
*/
|
||||
public struct CXCompileCommand : this(void* ptr);
|
||||
|
||||
/**
|
||||
* Error codes for Compilation Database
|
||||
*/
|
||||
[AllowDuplicates] public enum CXCompilationDatabase_Error : c_int {
|
||||
/*
|
||||
* No error occurred
|
||||
*/
|
||||
NoError = 0,
|
||||
|
||||
/*
|
||||
* Database can not be loaded
|
||||
*/
|
||||
CanNotLoadDatabase = 1,
|
||||
|
||||
}
|
||||
|
||||
extension Clang
|
||||
{
|
||||
/**
|
||||
* Creates a compilation database from the database found in directory
|
||||
* buildDir. For example, CMake can output a compile_commands.json which can
|
||||
* be used to build the database.
|
||||
*
|
||||
* It must be freed by \c clang_CompilationDatabase_dispose.
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_fromDirectory")] public static extern CXCompilationDatabase CompilationDatabase_FromDirectory(c_char* BuildDir, CXCompilationDatabase_Error* ErrorCode);
|
||||
|
||||
/**
|
||||
* Free the given compilation database
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_dispose")] public static extern void CompilationDatabase_Dispose(CXCompilationDatabase);
|
||||
|
||||
/**
|
||||
* Find the compile commands used for a file. The compile commands
|
||||
* must be freed by \c clang_CompileCommands_dispose.
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_getCompileCommands")] public static extern CXCompileCommands CompilationDatabase_GetCompileCommands(CXCompilationDatabase, c_char* CompleteFileName);
|
||||
|
||||
/**
|
||||
* Get all the compile commands in the given compilation database.
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_getAllCompileCommands")] public static extern CXCompileCommands CompilationDatabase_GetAllCompileCommands(CXCompilationDatabase);
|
||||
|
||||
/**
|
||||
* Free the given CompileCommands
|
||||
*/
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommands_dispose")] public static extern void CompileCommands_Dispose(CXCompileCommands);
|
||||
|
||||
/**
|
||||
* Get the number of CompileCommand we have for a file
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommands_getSize")] public static extern c_uint CompileCommands_GetSize(CXCompileCommands);
|
||||
|
||||
/**
|
||||
* Get the I'th CompileCommand for a file
|
||||
*
|
||||
* Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands)
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommands_getCommand")] public static extern CXCompileCommand CompileCommands_GetCommand(CXCompileCommands, c_uint I);
|
||||
|
||||
/**
|
||||
* Get the working directory where the CompileCommand was executed from
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommand_getDirectory")] public static extern CXString CompileCommand_GetDirectory(CXCompileCommand);
|
||||
|
||||
/**
|
||||
* Get the filename associated with the CompileCommand.
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommand_getFilename")] public static extern CXString CompileCommand_GetFilename(CXCompileCommand);
|
||||
|
||||
/**
|
||||
* Get the number of arguments in the compiler invocation.
|
||||
*
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommand_getNumArgs")] public static extern c_uint CompileCommand_GetNumArgs(CXCompileCommand);
|
||||
|
||||
/**
|
||||
* Get the I'th argument value in the compiler invocations
|
||||
*
|
||||
* Invariant :
|
||||
* - argument 0 is the compiler executable
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommand_getArg")] public static extern CXString CompileCommand_GetArg(CXCompileCommand, c_uint I);
|
||||
|
||||
/**
|
||||
* Get the number of source mappings for the compiler invocation.
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommand_getNumMappedSources")] public static extern c_uint CompileCommand_GetNumMappedSources(CXCompileCommand);
|
||||
|
||||
/**
|
||||
* Get the I'th mapped source path for the compiler invocation.
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommand_getMappedSourcePath")] public static extern CXString CompileCommand_GetMappedSourcePath(CXCompileCommand, c_uint I);
|
||||
|
||||
/**
|
||||
* Get the I'th mapped source content for the compiler invocation.
|
||||
*/
|
||||
|
||||
[Import(Clang.dll)] [LinkName("clang_CompileCommand_getMappedSourceContent")] public static extern CXString CompileCommand_GetMappedSourceContent(CXCompileCommand, c_uint I);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user