Files
clang-p2996/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/keep-func.test
Alexey Lapshin f1fdfe6888 [dsymutil][llvm-dwarfutil] Rename command line options to avoid using vendor names. (#78135)
This patch renames values of dsymutil/llvm-dwarfutil options:

--linker apple -> --linker classic
--linker llvm -> --linker parallel

The purpose to rename options is to avoid using vendor names and to
match with library names. It should be safe to rename options at current
stage as they are not seemed widely used(we may not preserve backward
compatibility).
2024-01-18 12:55:04 +03:00

37 lines
1.0 KiB
Plaintext

$ cat main.cpp
#include <stdio.h>
static void Foo(void)
{
typedef struct {
int x1;
int x2;
} FOO_VAR_TYPE;
static FOO_VAR_TYPE MyDummyVar __attribute__((aligned(4), used, section("TAD_VIRTUAL, TAD_DUMMY_DATA"), nocommon));
printf("Foo called");
}
int main()
{
Foo();
return 1;
}
$ clang++ -O2 -g main.cpp -c -o main.o
$ clang++ main.o -o main.out
RUN: dsymutil --linker parallel -oso-prepend-path %p/../../Inputs %p/../../Inputs/private/tmp/keep_func/main.out -o %t.omit.dSYM
RUN: dsymutil --linker parallel -oso-prepend-path %p/../../Inputs %p/../../Inputs/private/tmp/keep_func/main.out -o %t.keep.dSYM -keep-function-for-static
RUN: llvm-dwarfdump %t.omit.dSYM | FileCheck %s --check-prefix OMIT
RUN: llvm-dwarfdump %t.keep.dSYM | FileCheck %s --check-prefix KEEP
KEEP: DW_AT_name ("x1")
KEEP: DW_AT_name ("x2")
KEEP: DW_AT_name ("FOO_VAR_TYPE")
KEEP: DW_AT_name ("MyDummyVar")
OMIT-NOT: DW_AT_name ("MyDummyVar")
OMIT-NOT: DW_AT_name ("FOO_VAR_TYPE")
OMIT-NOT: DW_AT_name ("x1")
OMIT-NOT: DW_AT_name ("x2")