Skip to content

Commit

Permalink
[lldb] Remove license headers from all test source files
Browse files Browse the repository at this point in the history
Summary:
Around a third of our test sources have LLVM license headers. This patch removes those headers from all test
sources and also fixes any tests that depended on the length of the license header.

The reasons for this are:

* A few tests verify line numbers and will start failing if the number of lines in the LLVM license header changes. Once I landed my patch for valid SourceLocations in debug info we will probably have even more tests that verify line numbers.
* No other LLVM project is putting license headers in its test files to my knowledge.
* They make the test sources much more verbose than they have to be. Several tests have longer license headers than the actual test source.

For the record, the following tests had their line numbers changed to pass with the removal of the license header:
    lldb-api :: functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
    lldb-shell :: Reproducer/TestGDBRemoteRepro.test
    lldb-shell :: Reproducer/TestMultipleTargets.test
    lldb-shell :: Reproducer/TestReuseDirectory.test
    lldb-shell :: ExecControl/StopHook/stop-hook-threads.test
    lldb-shell :: ExecControl/StopHook/stop-hook.test
    lldb-api :: lang/objc/exceptions/TestObjCExceptions.py

Reviewers: #lldb, espindola, JDevlieghere

Reviewed By: #lldb, JDevlieghere

Subscribers: emaste, aprantl, arphaman, JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D74839
  • Loading branch information
Teemperor committed Feb 20, 2020
1 parent d8916e5 commit fdea9a4
Show file tree
Hide file tree
Showing 278 changed files with 21 additions and 2,083 deletions.
8 changes: 0 additions & 8 deletions lldb/test/API/android/platform/main.cpp
@@ -1,11 +1,3 @@
//===-- 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
//
//===----------------------------------------------------------------------===//

int main ()
{
return 0;
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/api/check_public_api_headers/main.cpp.template
@@ -1,11 +1,3 @@
//===-- 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>
%include_SB_APIs%

Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/benchmarks/expression/main.cpp
@@ -1,10 +1,3 @@
//===-- 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>

class Point {
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/add-dsym/uuid/main.cpp.template
@@ -1,11 +1,3 @@
//===-- 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>

int
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/apropos/with-process/main.cpp
@@ -1,10 +1,3 @@
//===-- 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>

int main (int argc, char const *argv[])
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/command/nested_alias/main.cpp
@@ -1,10 +1,3 @@
//===-- 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>

int main (int argc, char const *argv[])
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/command/script/main.cpp
@@ -1,11 +1,3 @@
//===-- 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 <cstdlib>
#include <cstring>
#include <string>
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/disassemble/basic/main.cpp
@@ -1,11 +1,3 @@
//===-- 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
//
//===----------------------------------------------------------------------===//

int
sum (int a, int b)
{
Expand Down
@@ -1,11 +1,3 @@
//===-- 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
//
//===----------------------------------------------------------------------===//

int main()
{
int i;
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/expression/persistent_types/main.c
@@ -1,11 +1,3 @@
//===-- main.c --------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

int main (int argc, char const *argv[])
{
const char* foo = "Hello world";
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/expression/persistent_variables/main.c
@@ -1,11 +1,3 @@
//===-- main.c --------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

int main (int argc, char const *argv[])
{
int i = 5;
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/expression/radar_8638051/main.c
@@ -1,10 +1,3 @@
//===-- main.c --------------------------------------------------*- 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>

// This simple program is to demonstrate the capability of the lldb command
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/expression/radar_9531204/main.c
@@ -1,10 +1,3 @@
//===-- main.c --------------------------------------------------*- 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>

// breakpoint set -n foo
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/expression/radar_9673664/main.c
@@ -1,10 +1,3 @@
//===-- main.c --------------------------------------------------*- 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>

int main (int argc, char const *argv[])
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/expression/save_jit_objects/main.c
@@ -1,11 +1,3 @@
//===-- main.c --------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

int main (int argc, char const *argv[])
{
const char* foo = "Hello world"; // break here
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/frame/recognizer/main.m
@@ -1,11 +1,3 @@
//===-- main.m ------------------------------------------------*- ObjC -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#import <Foundation/Foundation.h>

void foo(int a, int b)
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/frame/var-scope/main.c
@@ -1,11 +1,3 @@
//===-- main.c --------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

int foo(int x, int y) {
int z = 3 + x;
return z + y; //% self.expect("frame variable -s", substrs=['ARG: (int) x = -3','ARG: (int) y = 0'])
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/log/basic/main.cpp
@@ -1,11 +1,3 @@
//===-- 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 <cstdlib>
#include <string>
#include <fstream>
Expand Down
@@ -1,10 +1,3 @@
//===-- 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 <cpuid.h>
Expand Down
@@ -1,10 +1,3 @@
//===-- 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 <cstddef>
Expand Down
@@ -1,10 +1,3 @@
//===-- a.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>

long double
Expand Down
@@ -1,10 +1,3 @@
//===-- 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>

#include <chrono>
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/settings/main.cpp
@@ -1,11 +1,3 @@
//===-- 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 <cstdlib>
#include <string>
#include <fstream>
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/target/basic/a.c
@@ -1,11 +1,3 @@
//===-- main.c --------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

int main(int argc, const char* argv[])
{
int *null_ptr = 0;
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/target/basic/b.c
@@ -1,11 +1,3 @@
//===-- main.c --------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

int main (int argc, char const *argv[])
{
return 0; // Set break point at this line.
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/target/basic/c.c
@@ -1,10 +1,3 @@
//===-- main.c --------------------------------------------------*- 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>

int main (int argc, char const *argv[])
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/target/basic/globals.c
@@ -1,10 +1,3 @@
//===-- main.c --------------------------------------------------*- 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>

char my_global_char = 'X';
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/target/create-deps/a.cpp
@@ -1,11 +1,3 @@
//===-- b.c -----------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

int a_function ()
{
return 500;
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/target/create-deps/main.cpp
@@ -1,11 +1,3 @@
//===-- main.c --------------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

extern int a_function ();
extern int b_function ();

Expand Down
@@ -1,11 +1,3 @@
//===-- 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 <chrono>
#include <condition_variable>
#include <cstdio>
Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/watchpoints/hello_watchpoint/main.c
@@ -1,10 +1,3 @@
//===-- main.c --------------------------------------------------*- 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>
#include <stdint.h>

Expand Down
@@ -1,10 +1,3 @@
//===-- main.c --------------------------------------------------*- 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>
#include <stdint.h>

Expand Down
7 changes: 0 additions & 7 deletions lldb/test/API/commands/watchpoints/multiple_hits/main.cpp
@@ -1,10 +1,3 @@
//===-- 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>
#include <stdint.h>
alignas(16) uint8_t buf[32];
Expand Down
8 changes: 0 additions & 8 deletions lldb/test/API/commands/watchpoints/multiple_threads/main.cpp
@@ -1,11 +1,3 @@
//===-- 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 "pseudo_barrier.h"
#include <cstdio>
#include <thread>
Expand Down

0 comments on commit fdea9a4

Please sign in to comment.