GCC Middle and Back End API Reference
sarif-replay.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "version.h"
#include "intl.h"
#include "libgdiagnostics++.h"
#include "libsarifreplay.h"
Include dependency graph for sarif-replay.cc:

Data Structures

struct  options

Macros

#define INCLUDE_STRING
#define INCLUDE_VECTOR
#define ADD_OUTPUT_OPTION   "-fdiagnostics-add-output="

Functions

static void set_defaults (replay_options &replay_opts)
static void print_version ()
static void print_usage ()
static const char * str_starts_with (const char *str, const char *prefix)
static bool parse_options (int argc, char **argv, options &opts, libgdiagnostics::text_sink control_text_sink)
static const char * get_progname (const char *argv0)
int main (int argc, char **argv)

Variables

static const char * progname
static const char *const usage_msg

Macro Definition Documentation

◆ ADD_OUTPUT_OPTION

#define ADD_OUTPUT_OPTION   "-fdiagnostics-add-output="

Referenced by main(), and parse_options().

◆ INCLUDE_STRING

#define INCLUDE_STRING
A program for re-emitting diagnostics saved in SARIF form.
   Copyright (C) 2022-2025 Free Software Foundation, Inc.
   Contributed by David Malcolm <dmalcolm@redhat.com>.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   

◆ INCLUDE_VECTOR

#define INCLUDE_VECTOR

Function Documentation

◆ get_progname()

const char * get_progname ( const char * argv0)
static

Referenced by main().

◆ main()

◆ parse_options()

◆ print_usage()

void print_usage ( void )
static

References usage_msg.

Referenced by main(), and parse_options().

◆ print_version()

void print_version ( void )
static

References _, and progname.

Referenced by parse_options().

◆ set_defaults()

◆ str_starts_with()

const char * str_starts_with ( const char * str,
const char * prefix )
static
If STR starts with PREFIX, return the rest of STR.
Otherwise return nullptr.   

Referenced by parse_options().

Variable Documentation

◆ progname

const char* progname
static

◆ usage_msg

const char* const usage_msg
static

Referenced by print_usage().