clang-compilation-database-0.1.0.0: JSON Compilation Database Format encoding and decoding

LicenseMIT
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Clang.CompilationDatabase

Description

Clang Compilation Database Format parser

The Clang Compilation Database Format is a JSON file format for recording compiler invocations in build systems.

Synopsis

Documentation

type CompilationDatabase = [CommandObject] Source #

A Compilation database consists of a sequence of CommandObject values each of which is a set of commands that acted upon a single source file.

data CommandObject Source #

Each command object contains the translation unit’s main file, the working directory of the compile run and the actual compile command.

Constructors

CommandObject 

Fields

  • directory :: Text

    The working directory during compilation

  • file :: Text

    The main translation unit processed by this compilation step. There may be multiple CommandObject values in a CompilationDatabase for the same file if it was the main file for multiple compilation steps.

  • command :: Maybe Text

    The command that was executed. Double quotes and backslashes are escaped by a backslash.

  • arguments :: Maybe [Text]

    The compile command executed as a list of strings. Either command or arguments is required. TODO model this more faithfully.

  • output :: Maybe Text

    Optional name of the output file created by this compilation step.