Skip to content

Commit fe9f535

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merge llvm/main into amd-debug
2 parents 4f2174c + f13a35c commit fe9f535

File tree

110 files changed

+6593
-534
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+6593
-534
lines changed

clang/tools/libclang/CXIndexDataConsumer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,7 @@ static CXIdxEntityKind getEntityKindFromSymbolKind(SymbolKind K, SymbolLanguage
12411241
case SymbolKind::TemplateTypeParm:
12421242
case SymbolKind::TemplateTemplateParm:
12431243
case SymbolKind::NonTypeTemplateParm:
1244+
case SymbolKind::IncludeDirective:
12441245
return CXIdxEntity_Unexposed;
12451246

12461247
case SymbolKind::Enum: return CXIdxEntity_Enum;

compiler-rt/test/asan/TestCases/Linux/coverage-missing.cpp

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
// Test for "sancov.py missing ...".
22

33
// First case: coverage from executable. main() is called on every code path.
4+
// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
45
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t -DFOOBAR -DMAIN
5-
// RUN: rm -rf %t-dir
6-
// RUN: mkdir -p %t-dir
7-
// RUN: cd %t-dir
8-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t
6+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t
97
// RUN: %sancov print *.sancov > main.txt
108
// RUN: rm *.sancov
119
// RUN: count 1 < main.txt
12-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x
10+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x
1311
// RUN: %sancov print *.sancov > foo.txt
1412
// RUN: rm *.sancov
1513
// RUN: count 3 < foo.txt
16-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x
14+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x x
1715
// RUN: %sancov print *.sancov > bar.txt
1816
// RUN: rm *.sancov
1917
// RUN: count 4 < bar.txt
@@ -26,18 +24,15 @@
2624
// RUN: not grep "^<" %t.log
2725

2826
// Second case: coverage from DSO.
29-
// cd %t-dir
27+
// RUN: cd ..
28+
// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
3029
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %dynamiclib -DFOOBAR -shared -fPIC
3130
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %dynamiclib -o %t -DMAIN
32-
// RUN: cd ..
33-
// RUN: rm -rf %t-dir
34-
// RUN: mkdir -p %t-dir
35-
// RUN: cd %t-dir
36-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x
31+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x
3732
// RUN: %sancov print %xdynamiclib_filename.*.sancov > foo.txt
3833
// RUN: rm *.sancov
3934
// RUN: count 2 < foo.txt
40-
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x
35+
// RUN: %env_asan_opts=coverage=1:coverage_dir=%t.dir %run %t x x
4136
// RUN: %sancov print %xdynamiclib_filename.*.sancov > bar.txt
4237
// RUN: rm *.sancov
4338
// RUN: count 3 < bar.txt

compiler-rt/test/asan/TestCases/Linux/local_alias.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// false positive global-buffer-overflow due to sanitized library poisons
55
// globals from non-sanitized one.
66
//
7+
// RUN: mkdir -p %t.dir && cd %t.dir
78
// RUN: %clangxx_asan -DBUILD_INSTRUMENTED_DSO=1 -fPIC -shared -mllvm -asan-use-private-alias %s -o %dynamiclib1
89
// RUN: %clangxx -DBUILD_UNINSTRUMENTED_DSO=1 -fPIC -shared %s -o %dynamiclib2
910
// RUN: %clangxx %s -c -mllvm -asan-use-private-alias -o %t.o

compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// -fno-sanitize-address-use-odr-indicator turns off both.
1111
//
1212
// Different size: detect a bug if detect_odr_violation>=1
13+
// RUN: mkdir -p %t.dir && cd %t.dir
1314
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fno-sanitize-address-use-odr-indicator %s -o %dynamiclib
1415
// RUN: %clangxx_asan -g -fno-sanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
1516
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 not %run %t-ODR-EXE 2>&1 | FileCheck %s

compiler-rt/test/asan/TestCases/Linux/odr-vtable.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// REQUIRES: shared_cxxabi
55

66
/// Not using private alias or enabling ODR indicator can detect ODR issues.
7+
// RUN: mkdir -p %t.dir && cd %t.dir
78
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO1 -fPIC -shared -mllvm -asan-use-private-alias=0 %s -o %dynamiclib1
89
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO2 -fPIC -shared -mllvm -asan-use-private-alias=0 %s -o %dynamiclib2
910
// RUN: %clangxx_asan -fno-rtti %s %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t

compiler-rt/test/asan/TestCases/Linux/odr_c_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Test that we can properly report an ODR violation between an instrumented
22
// global and a non-instrumented global if not using private aliases.
33

4+
// RUN: mkdir -p %t.dir && cd %t.dir
45
// RUN: %clang_asan -fcommon %s -fPIC -shared -mllvm -asan-use-private-alias=0 -o %dynamiclib1 -DFILE1
56
// RUN: %clang_asan -fcommon %s -fPIC -shared -mllvm -asan-use-private-alias=0 -o %dynamiclib2 -DFILE2
67
// RUN: %clang_asan -fcommon %s -fPIE %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t

compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: mkdir -p %t.dir && cd %t.dir
12
// RUN: %clangxx -DFUNC=zzzz %s -shared -o %dynamiclib -fPIC
23
// RUN: %clangxx_asan -DFUNC=main %s -o %t %ld_flags_rpath_exe
34
// RUN: %run %t

compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Check that unloading a module doesn't break coverage dumping for remaining
22
// modules.
3+
// RUN: mkdir -p %t.dir && cd %t.dir
34
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib1 -fPIC
45
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib2 -fPIC
56
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %libdl -o %t.exe

compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
12
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
23
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
3-
// RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
44
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s
55
//
66
// UNSUPPORTED: ios

compiler-rt/test/asan/TestCases/Posix/coverage.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
// RUN:rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
12
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
23
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
3-
// RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
44
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-main
55
// RUN: %sancov print coverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV1
66
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-foo
@@ -14,7 +14,6 @@
1414
// RUN: %sancov print merged-cov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV2
1515
// RUN: %env_asan_opts=coverage=1:verbosity=1 not %run %t foo bar 4 2>&1 | FileCheck %s --check-prefix=CHECK-report
1616
// RUN: %env_asan_opts=coverage=1:verbosity=1 not %run %t foo bar 4 5 2>&1 | FileCheck %s --check-prefix=CHECK-segv
17-
// RUN: cd .. && rm -rf %t-dir
1817
//
1918
// https://code.google.com/p/address-sanitizer/issues/detail?id=263
2019
// XFAIL: android

0 commit comments

Comments
 (0)