Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@@ -0,0 +1,26 @@
void call();
struct S {
static void foo() { call(); call(); }
static void bar() { call(); call(); }
static void baz() {}
};
#ifdef FILE1
# define FUNC_NAME func1
# define FUNC_BODY \
S::foo(); S::bar(); S::baz();
#else
# define FUNC_NAME func2
# define FUNC_BODY \
S::bar();
#endif
void FUNC_NAME() {
FUNC_BODY
}
// Build instructions:
// $ clang -g -fPIC -c -DFILE1 arange-overlap.cc -o obj1.o
// $ clang -g -fPIC -c arange-overlap.cc -o obj2.o
// $ clang -shared obj1.o obj2.o -o <output>

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,18 @@
// To generate the test file:
// clang cross-cu-inlining.c -DA_C -g -emit-llvm -S -o a.ll
// clang cross-cu-inlining.c -DB_C -g -emit-llvm -S -o b.ll
// llvm-link a.ll b.ll -o ab.bc
// opt -inline ab.bc -o cross-cu-inlining.bc
// clang -c cross-cu-inlining.bc -o cross-cu-inlining.o
#ifdef A_C
int i;
int func(int);
int main() {
return func(i);
}
#endif
#ifdef B_C
int __attribute__((always_inline)) func(int x) {
return x * 2;
}
#endif

View File

@@ -0,0 +1,18 @@
#include "dwarfdump-inl-test.h"
static inline int inlined_f() {
volatile int x = inlined_g();
return x;
}
int main() {
return inlined_f();
}
// Built with Clang 3.2
// $ mkdir -p /tmp/dbginfo
// $ cp dwarfdump-inl-test.* /tmp/dbginfo
// $ cd /tmp/dbginfo
// $ clang++ -O2 -gline-tables-only -fsanitize=address -fPIC -shared dwarfdump-inl-test.cc -o <output>
//
// And similarly with with gcc 4.8.2:
// $ gcc dwarfdump-inl-test.cc -o dwarfdump-inl-test.high_pc.elf-x86-64 -g -O2 -fPIC -shared

Binary file not shown.

View File

@@ -0,0 +1,9 @@
inline int inlined_h() {
volatile int z = 0;
return z;
}
inline int inlined_g() {
volatile int y = inlined_h();
return y;
}

Binary file not shown.

View File

@@ -0,0 +1 @@
#define M4 Value4

View File

@@ -0,0 +1,11 @@
#define M1 Value1
#include "dwarfdump-macro.h"
#define M2(x, y) ((x)+(y)* Value2)
// Built with GCC
// $ mkdir -p /tmp/dbginfo
// $ cp dwarfdump-macro.cc /tmp/dbginfo
// $ cp dwarfdump-macro.h /tmp/dbginfo
// $ cp dwarfdump-macro-cmd.h /tmp/dbginfo
// $ cd /tmp/dbginfo
// $ g++ -c -g3 -O0 -DM3=Value3 -include dwarfdump-macro-cmd.h dwarfdump-macro.cc -o <output>

View File

@@ -0,0 +1,5 @@
#undef M1
#define M1 NewValue1

View File

@@ -0,0 +1,22 @@
// Compile with clang -g dwarfdump-objc.m -c -Wno-objc-root-class
@interface NSObject {} @end
@interface TestInterface
@property (readonly) int ReadOnly;
@property (assign) int Assign;
@property (readwrite) int ReadWrite;
@property (retain) NSObject *Retain;
@property (copy) NSObject *Copy;
@property (nonatomic) int NonAtomic;
@property (atomic) int Atomic;
@property (strong) NSObject *Strong;
@property (unsafe_unretained) id UnsafeUnretained;
@property (nullable) NSObject *Nullability;
@property (null_resettable) NSObject *NullResettable;
@property (class) int ClassProperty;
@end
@implementation TestInterface
@end

View File

@@ -0,0 +1,32 @@
// Object file built using:
// clang -g -mllvm -generate-dwarf-pubnames -o dwarfdump-pubnames.elf-x86_64 \
// dwarfdump-pubnames.cc -c
struct C {
void member_function();
static int static_member_function();
static int static_member_variable;
};
int C::static_member_variable = 0;
void C::member_function() {
static_member_variable = 0;
}
int C::static_member_function() {
return static_member_variable;
}
C global_variable;
int global_function() {
return -1;
}
namespace ns {
void global_namespace_function() {
global_variable.member_function();
}
int global_namespace_variable = 1;
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
// clang -c -g -o dwarfdump-test-32bit.elf.o -m32 dwarfdump-test-32bit.elf.c
extern int glob;
int foo(int arg) {
int a = arg * 2;
return a + glob;
}
int bar(int arg) {
int a = foo(arg) * foo(arg * 2);
return glob - foo(a);
}

View File

@@ -0,0 +1,13 @@
// clang -c -g -o dwarfdump-test-loc-list-32bit.elf.o -m32 dwarfdump-test-loc-list-32bit.elf.cpp
namespace pr14763 {
struct foo {
foo(const foo&);
};
foo func(bool b, foo f, foo g) {
if (b)
return f;
return g;
}
}

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