GCC Middle and Back End API Reference
edit-context.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "line-map.h"
#include "edit-context.h"
#include "pretty-print.h"
#include "diagnostic-color.h"
#include "selftest.h"
Include dependency graph for edit-context.cc:

Data Structures

class  diff
 
class  edited_file
 
class  added_line
 
class  line_event
 
class  edited_line
 

Functions

static void print_diff_line (pretty_printer *pp, char prefix_char, const char *line, int line_size)
 
static int line_comparator (int a, int b)
 

Function Documentation

◆ line_comparator()

static int line_comparator ( int a,
int b )
static
Implementation of class edited_file.   
Callback for m_edited_lines, for comparing line numbers.   

References a, and b.

◆ print_diff_line()

static void print_diff_line ( pretty_printer * pp,
char prefix_char,
const char * line,
int len )
static
Forward decls.   
Print one line within a diff, starting with PREFIX_CHAR,
followed by the LINE of content, of length LEN.  LINE is
not necessarily 0-terminated.  Print a trailing newline.   

References i, and pp_character().

Referenced by edited_file::print_diff_hunk(), edited_line::print_diff_lines(), and edited_file::print_run_of_changed_lines().