Johnny Chen | af6e82f | 2011-07-12 23:18:03 +0000 | [diff] [blame] | 1 | //===-- main.c --------------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | #include <stdio.h> |
| 10 | |
| 11 | char my_global_char = 'X'; |
| 12 | const char* my_global_str = "abc"; |
Enrico Granata | 9128ee2 | 2011-09-06 19:20:51 +0000 | [diff] [blame] | 13 | const char **my_global_str_ptr = &my_global_str; |
Johnny Chen | 0d0dff43 | 2011-07-13 00:31:31 +0000 | [diff] [blame] | 14 | static int my_static_int = 228; |
Johnny Chen | af6e82f | 2011-07-12 23:18:03 +0000 | [diff] [blame] | 15 | |
| 16 | int main (int argc, char const *argv[]) |
| 17 | { |
| 18 | printf("global char: %c\n", my_global_char); |
| 19 | |
| 20 | printf("global str: %s\n", my_global_str); |
Johnny Chen | 0d0dff43 | 2011-07-13 00:31:31 +0000 | [diff] [blame] | 21 | |
| 22 | printf("argc + my_static_int = %d\n", (argc + my_static_int)); |
Johnny Chen | af6e82f | 2011-07-12 23:18:03 +0000 | [diff] [blame] | 23 | |
| 24 | return 0; |
| 25 | } |