14#define GENERATOR_PROGRAM_CONTENTS "#include <stdio.h>\nint main(void){printf(\"\");}"
18#define GENERATOR_PROGRAM_CONTENTS_LENGTH sizeof(GENERATOR_PROGRAM_CONTENTS)
22#define GENERATOR_PROGRAM_FILENAME ".prp_platform_information_generator.c"
26#define GENERATOR_PROGRAM_FILENAME_LL ".prp_platform_information_generator.ll"
42#define PURPLE_GLOBALS_PLACEHOLDER ";<purple_globals_placeholder>"
46#define PURPLE_GLOBALS_PLACEHOLDER_LEN sizeof(PURPLE_GLOBALS_PLACEHOLDER) - 1
54char*
regex_match(
const char* regex,
char* target_str,
int len,
int group_index);
void create_tmp_generator_program(void)
Create a temporary file for a generator program used to determine compilation information.
Definition: clang.c:51
char * get_target_triple(void)
Get the target triple for the current target.
Definition: clang.c:253
void link_globals(void)
Link globals.ll to main LLVM file by copying the contents of each LLVM file into a temporary file,...
Definition: clang.c:113
void clang_compile_llvm(const char *fn)
Starts up the clang compiler to compile the generated LLVM-IR into a binary.
Definition: clang.c:175
char * get_postamble(void)
static char generatorProgramLLFullPath[512]
Full path to GENERATOR_PROGRAM's LLVM-compiled file.
Definition: clang.h:34
static char generatorProgramFullPath[512]
Full path to GENERATOR_PROGRAM.
Definition: clang.h:30
char * get_target_datalayout(void)
Search through GENERATOR_PROGRAM for the target datalayout.
Definition: clang.c:216
char * regex_match(const char *regex, char *target_str, int len, int group_index)
Simple regex parser.
Definition: clang.c:294
static bool generatorProgramWritten
True if the generator program has been written and compiled.
Definition: clang.h:38