Skip to content

Commit 128e55a

Browse files
committed
Merge commit 'a113a582b1a2c04f5df89db50e446074f74559b0' into llvmspirv_pulldown
2 parents a0a4371 + a113a58 commit 128e55a

File tree

721 files changed

+49050
-12499
lines changed

Some content is hidden

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

721 files changed

+49050
-12499
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2350,7 +2350,7 @@ void RewriteInstance::readRelocations(const SectionRef &Section) {
23502350
continue;
23512351
}
23522352

2353-
if (BC->getDynamicRelocationAt(Rel.getOffset())) {
2353+
if (!IsAArch64 && BC->getDynamicRelocationAt(Rel.getOffset())) {
23542354
LLVM_DEBUG(
23552355
dbgs() << "BOLT-DEBUG: address 0x"
23562356
<< Twine::utohexstr(Rel.getOffset())

bolt/test/AArch64/constant-island-alignment.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
66
# RUN: %s -o %t.o
77
# RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -Wl,-q \
8-
# RUN: -nostartfiles -nodefaultlibs -lc
8+
# RUN: -nostartfiles -nodefaultlibs -Wl,-z,notext
99
# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0 -trap-old-code
1010
# RUN: llvm-objdump -d --disassemble-symbols='$d' %t.bolt | FileCheck %s
1111

@@ -21,16 +21,16 @@ dummy:
2121
.type exitOk, %function
2222
exitOk:
2323
mov x0, #0
24-
bl exit
24+
ret
2525

2626
.global _start
2727
.type _start, %function
2828
_start:
2929
adrp x0, .Lci
3030
ldr x0, [x0, #:lo12:.Lci]
3131
blr x0
32-
mov x1, #1
33-
bl exit
32+
mov x0, #1
33+
ret
3434
nop
3535
# CHECK: {{0|8}} <$d>:
3636
.Lci:
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// This test checks that the constant island value is updated if it
2+
// has dynamic relocation.
3+
4+
# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
5+
# RUN: %s -o %t.o
6+
# RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -Wl,-q -nostdlib -Wl,-z,notext
7+
# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0
8+
# RUN: llvm-objdump -j .text -dR %t.bolt | FileCheck %s
9+
10+
# CHECK: R_AARCH64_RELATIVE *ABS*+0x[[#%x,ADDR:]]
11+
# CHECK: [[#ADDR]] <exitLocal>:
12+
# CHECK: {{.*}} <$d>:
13+
# CHECK-NEXT: {{.*}} .word 0x{{[0]+}}[[#ADDR]]
14+
# CHECK-NEXT: {{.*}} .word 0x00000000
15+
16+
.text
17+
.align 4
18+
.local exitLocal
19+
.type exitLocal, %function
20+
exitLocal:
21+
add x1, x1, #1
22+
add x1, x1, #1
23+
ret
24+
.size exitLocal, .-exitLocal
25+
26+
.global _start
27+
.type _start, %function
28+
_start:
29+
mov x0, #0
30+
adr x1, .Lci
31+
ldr x1, [x1]
32+
blr x1
33+
mov x0, #1
34+
bl exitLocal
35+
nop
36+
.Lci:
37+
.xword exitLocal
38+
.size _start, .-_start

bolt/test/AArch64/double_jump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ unsigned long foo(unsigned long count) {
5252
return count;
5353
}
5454

55-
int main(int argc, const char *argv[]) { return foo(38); }
55+
extern "C" int _start() { return foo(38); }

bolt/test/AArch64/lit.local.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
if config.host_arch not in ['aarch64']:
22
config.unsupported = True
3+
4+
config.substitutions.insert(
5+
0, ('%cflags',
6+
'%cflags --target=aarch64-pc-linux -nostartfiles -nostdlib -fuse-ld=lld'
7+
' -Wl,--unresolved-symbols=ignore-all'))

bolt/test/AArch64/tailcall_traps.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
.text
1919
.align 4
20-
.global main
21-
.type main, %function
22-
main:
20+
.global _start
21+
.type _start, %function
22+
_start:
2323
nop
2424
ret
25-
.size main, .-main
25+
.size _start, .-_start
2626

2727
.global foo
2828
.type foo, %function

clang-tools-extra/clang-tidy/modernize/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ add_clang_library(clangTidyModernizeModule
1111
DeprecatedIosBaseAliasesCheck.cpp
1212
LoopConvertCheck.cpp
1313
LoopConvertUtils.cpp
14+
MacroToEnumCheck.cpp
1415
MakeSharedCheck.cpp
1516
MakeSmartPtrCheck.cpp
1617
MakeUniqueCheck.cpp

0 commit comments

Comments
 (0)