teak-llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
Chandler Carruth 2946cd7010 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00

61 lines
1.3 KiB
C++

//===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
const char g_CharArray[] = "\x10\x11\x12\x13";
static const char s_CharArray[] = "\x20\x21\x22\x23";
void
local_array_test_inner()
{
char array[] = { 0x01, 0x02, 0x03, 0x04 };
char *first_element_ptr = &array[0];
char g = g_CharArray[0];
char s = s_CharArray[0];
// BP_local_array_test_inner
return;
}
void
local_array_test()
{
char array[] = { 0x05, 0x06, 0x07, 0x08 };
// BP_local_array_test
local_array_test_inner();
return;
}
void
local_2d_array_test()
{
int array2d[2][3];
array2d[0][0] = 1;
array2d[0][1] = 2;
array2d[0][2] = 3;
array2d[1][0] = 4;
array2d[1][1] = 5;
array2d[1][2] = 6;
return; // BP_local_2d_array_test
}
void
hello_world()
{
printf("Hello, World!\n"); // BP_hello_world
}
int
main(int argc, char const *argv[])
{ // FUNC_main
local_array_test();
hello_world();
local_2d_array_test();
return 0;
}