Purple  0.1
Standard Language Specification
Classes | Macros | Typedefs | Functions
arguments.h File Reference

Function headers for command line argument parsing. More...

#include <argp.h>
#include <stdbool.h>
#include "info.h"
Include dependency graph for arguments.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PurpleArgs
 Structure containing command line arguments. More...
 

Macros

#define ARGP_HELP_FLAGS   0x100
 
#define ARGP_LLVM_OUTPUT   0x101
 
#define FLAGS_START   0x201
 
#define FCONST_EXPR_REDUCE_CODE   0x202
 
#define FPRINT_FUNC_ANNOTATIONS   0x203
 
#define FLAGS_END   0x300
 

Typedefs

typedef struct PurpleArgs PurpleArgs
 

Functions

void parse_args (PurpleArgs *args, int argc, char *argv[])
 Parses command-line arguments via argp. More...
 
void set_opt_level (PurpleArgs *args, int opt_level)
 Set optimization flags based on a given opt level. More...
 
void help_flags ()
 

Detailed Description

Function headers for command line argument parsing.

Author
CharlesAverill
Date
12-Oct-2021

Macro Definition Documentation

◆ ARGP_HELP_FLAGS

#define ARGP_HELP_FLAGS   0x100

◆ ARGP_LLVM_OUTPUT

#define ARGP_LLVM_OUTPUT   0x101

◆ FCONST_EXPR_REDUCE_CODE

#define FCONST_EXPR_REDUCE_CODE   0x202

◆ FLAGS_END

#define FLAGS_END   0x300

◆ FLAGS_START

#define FLAGS_START   0x201

◆ FPRINT_FUNC_ANNOTATIONS

#define FPRINT_FUNC_ANNOTATIONS   0x203

Typedef Documentation

◆ PurpleArgs

typedef struct PurpleArgs PurpleArgs

Function Documentation

◆ help_flags()

void help_flags ( )

◆ parse_args()

void parse_args ( PurpleArgs args,
int  argc,
char *  argv[] 
)

Parses command-line arguments via argp.

◆ set_opt_level()

void set_opt_level ( PurpleArgs args,
int  opt_level 
)

Set optimization flags based on a given opt level.

Parameters
argsPurpleArgs struct to set flags in
opt_levelLevel of optimization to set