• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- main.cpp ------------------------------------------------*- 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 
10 #include <stdio.h>
11 struct Summarize
12 {
13     int first;
14     int second;
15 };
16 
17 typedef struct Summarize summarize_t;
18 typedef summarize_t *summarize_ptr_t;
19 
20 summarize_t global_mine = {30, 40};
21 
22 struct TwoSummarizes
23 {
24     summarize_t first;
25     summarize_t second;
26 };
27 
28 int
main()29 main()
30 {
31     summarize_t mine = {10, 20};
32     summarize_ptr_t mine_ptr = &mine;
33 
34     TwoSummarizes twos = { {1,2}, {3,4} };
35 
36     printf ("Summarize: first: %d second: %d and address: 0x%p\n", mine.first, mine.second, mine_ptr); // Set break point at this line.
37     printf ("Global summarize: first: %d second: %d.\n", global_mine.first, global_mine.second);
38     return 0;
39 }
40 
41 
42