brintos

brintos / llvm-project-archived public Read only

0
0
Text · 574 B · 9d73ac7 Raw
21 lines · c
1#include <stdio.h>2#include <string.h>3 4// This simple program is to test the lldb Python API SBSection. It includes5// somes global data, and so the build process produces a DATA section, which 6// the test code can use to query for the target byte size7 8char my_global_var_of_char_type = 'X';9 10int main (int argc, char const *argv[])11{12    // this code just "does something" with the global so that it is not13    // optimised away14    if (argc > 1 && strlen(argv[1]))15    {16        my_global_var_of_char_type += argv[1][0];17    }18 19    return my_global_var_of_char_type;20}21