Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@@ -0,0 +1,3 @@
some text
0x40054d
some text2

View File

@@ -0,0 +1,19 @@
// To generate the corresponding EXE, run:
// clang-cl -MD -O2 -gdwarf -c coff-dwarf.cpp && lld-link -debug coff-dwarf.obj
extern "C" int puts(const char *str);
void __declspec(noinline) foo() {
puts("foo1");
puts("foo2");
}
// LLVM should inline this into main.
static void bar() {
foo();
}
int main() {
bar();
return 0;
}

View File

@@ -0,0 +1,20 @@
// To generate the corresponding EXE, run:
// clang-cl -MD -c coff-exports.cpp && lld-link /MANIFEST:NO coff-exports.obj
#define EXPORT __declspec(dllexport)
extern "C" int puts(const char *str);
EXPORT void __declspec(noinline) foo() {
puts("foo1");
puts("foo2");
}
void bar() {
foo();
}
EXPORT int main() {
bar();
return 0;
}

View File

@@ -0,0 +1,11 @@
static volatile int do_mul;
static volatile int x, v;
int foo () {
if (do_mul) x *= v; else x /= v;
return x;
}
int main() {
return foo() + foo();
}

View File

@@ -0,0 +1,8 @@
some text
0x400590
0x4005a5
0x4005ad
0x4005b9
0x4005ce
0x4005d4
some more text

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.dsym-test-exe-differentname</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.dsym-test-exe</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@@ -0,0 +1,8 @@
// clang -c dsym-test.c -g
// clang dsym-test.o -g -o dsym-test-exe
// dsymutil dsym-test-exe
// clang dsym-test.o -g -o dsym-test-exe-second
// dsymutil dsym-test-exe-second -o dsym-test-exe-differentname.dSYM
int main() {
return 0;
}

View File

@@ -0,0 +1,15 @@
/* Compile with:
clang -arch armv7 -arch armv7m -arch armv7em -arch x86_64 -arch x86_64h -c
*/
#ifdef __x86_64h__
void x86_64h_function() {}
#elif defined(__x86_64__)
void x86_64_function() {}
#elif defined(__ARM_ARCH_7EM__)
void armv7em_function() {}
#elif defined(__ARM_ARCH_7M__)
void armv7m_function() {}
#elif defined(__ARM_ARCH_7A__)
void armv7_function() {}
#endif

Binary file not shown.

View File

@@ -0,0 +1,16 @@
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
RUN: | llvm-symbolizer --inlining --relative-address -obj="%p/Inputs/coff-dwarf.exe" \
RUN: | FileCheck %s
This test relies on UnDecorateSymbolName, which is Windows-only.
REQUIRES: target-windows, system-windows
ADDR: 0x5009
ADDR: 0x5038
CHECK: foo(void)
CHECK: coff-dwarf.cpp:7
CHECK: bar(void)
CHECK: coff-dwarf.cpp:13
CHECK: main
CHECK: coff-dwarf.cpp:17

View File

@@ -0,0 +1,22 @@
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
RUN: | llvm-symbolizer --inlining --relative-address -obj="%p/Inputs/coff-exports.exe" \
RUN: | FileCheck %s
This test relies on UnDecorateSymbolName, which is Win32-only.
REQUIRES: system-windows
REQUIRES: target-windows
FIXME: This test depends on host, not target.
ADDR: 0x500A
ADDR: 0x5038
ADDR: 0x504B
We get the expected stack trace, except 'foo' appears for the 'bar' frame
because 'bar' isn't in the export table.
CHECK: foo(void)
CHECK: ??:0:0
CHECK: foo(void)
CHECK: ??:0:0
CHECK: main
CHECK: ??:0:0

View File

@@ -0,0 +1,14 @@
RUN: echo "%p/Inputs/dsym-test-exe 0x0000000100000f90" > %t.input
RUN: echo "%p/Inputs/dsym-test-exe-second 0x0000000100000f90" >> %t.input
RUN: llvm-symbolizer < %t.input | FileCheck %s --check-prefix=CHECK-NOHINT
RUN: llvm-symbolizer -dsym-hint=%p/Inputs/dsym-test-exe-differentname.dSYM < %t.input | FileCheck %s --check-prefix=CHECK-HINT
CHECK-NOHINT: main
CHECK-NOHINT: dsym-test.c
CHECK-NOHINT: main
CHECK-NOHINT: ??:0:0
CHECK-HINT: main
CHECK-HINT: dsym-test.c
CHECK-HINT: main
CHECK-HINT: dsym-test.c

View File

@@ -0,0 +1,11 @@
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=x86_64 | FileCheck --check-prefix=X86_64 %s
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=x86_64h | FileCheck --check-prefix=X86_64H %s
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=armv7 | FileCheck --check-prefix=ARMV7 %s
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=armv7em | FileCheck --check-prefix=ARMV7EM %s
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=armv7m | FileCheck --check-prefix=ARMV7M %s
X86_64: x86_64_function
X86_64H: x86_64h_function
ARMV7: armv7_function
ARMV7EM: armv7em_function
ARMV7M: armv7m_function

View File

@@ -0,0 +1,40 @@
; REQUIRES: x86_64-linux
; Checks if symbolizer can correctly symbolize address in the padding between
; functions.
; RUN: llc -o %t.o -filetype=obj -mtriple=x86_64-pc-linux %s
; RUN: echo 0x5 | llvm-symbolizer -obj=%t.o | FileCheck %s --check-prefix=FOO
; RUN: echo 0xd | llvm-symbolizer -obj=%t.o | FileCheck %s --check-prefix=PADDING
; RUN: echo 0x10 | llvm-symbolizer -obj=%t.o | FileCheck %s --check-prefix=MAIN
;FOO: foo
;PADDING: ??
;MAIN: main
@a = global i32 1, align 4
define i32 @foo() !dbg !9 {
entry:
%0 = load i32, i32* @a, align 4
ret i32 %0
}
define i32 @main() !dbg !14 {
entry:
%call = call i32 @foo(), !dbg !18
ret i32 %call
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!6, !7}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "padding-x86_64.c", directory: "/tmp/")
!2 = !{}
!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!6 = !{i32 2, !"Dwarf Version", i32 4}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!9 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !10, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2)
!10 = !DISubroutineType(types: !11)
!11 = !{!5}
!14 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !10, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized: false, unit: !0, variables: !2)
!18 = !DILocation(line: 7, column: 8, scope: !14)

Some files were not shown because too many files have changed in this diff Show More