Permalink
Browse files

Upgrade to LDC-LLVM 7.0.0-2 and adapt cdb + dmd-testsuite tests (#2912)

  • Loading branch information...
kinke committed Nov 16, 2018
1 parent 88212ac commit c3ba743de8c8dc701270fcc6f889265440abc463
@@ -278,7 +278,7 @@ jobs:
- image: ubuntu:14.04
environment:
- CI_OS: linux
- LLVM_VERSION: 7.0.0
- LLVM_VERSION: 7.0.0-2
- HOST_LDC_VERSION: 1.10.0
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON"
build-osx:
@@ -289,7 +289,7 @@ jobs:
- CI_OS: osx
- MACOSX_DEPLOYMENT_TARGET: 10.8
- USE_LIBCPP: true
- LLVM_VERSION: 7.0.0
- LLVM_VERSION: 7.0.0-2
- HOST_LDC_VERSION: 1.10.0
- BOOTSTRAP_CMAKE_FLAGS: "-DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS=-lc++"
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS=-lc++"
@@ -12,12 +12,12 @@ environment:
matrix:
- APPVEYOR_JOB_ARCH: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
LLVM_VERSION: 7.0.0
LLVM_VERSION: 7.0.0-2
HOST_LDC_VERSION: 1.10.0
EXTRA_CMAKE_FLAGS: -DBUILD_LTO_LIBS=ON
- APPVEYOR_JOB_ARCH: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
LLVM_VERSION: 7.0.0
LLVM_VERSION: 7.0.0-2
HOST_LDC_VERSION: 1.10.0
# scripts that are called at very beginning, before repo cloning
@@ -10,7 +10,7 @@ env:
global:
- secure: RQ6gpJFPBDGVlnz+ZzSgeMpkcnvcA/7Lzyj/r06fMFR5iOz2cYaImCekNRw2PlhYQ+0FCQ119TLMKNOa7OUu6XxUp5LZtq7pSB6QLe3RB3YysFsosNPlY/wyyRsrW9ICEbDP/X8kPcfrDtOPGS/dGIwgeo0+R4Yl0OLDK9GrExEY45bWgvuLqoWDO89pi31kBk5LG5MAYhHZ0UTdboi5A2GRT0T8M0kr53jBRka8FGkbncXfHp9+/6IjTVJoUduRkdsk0A9RN1KRoao6rtrBNNvwIStc6zxJSOHszoaTp/K/ucGC4InZl/9GHPS/Y78SGKn7YJv3tGmcGzqAxrVaXQ==
matrix:
- LLVM_VERSION=7.0.0
- LLVM_VERSION=7.0.0-2
EXTRA_CMAKE_FLAGS="-DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64"
build:
@@ -36,7 +36,8 @@ int byValue(ubyte ub, ushort us, uint ui, ulong ul,
// arguments implicitly passed by reference aren't shown if unused
float cim = c.im + fa[7] + dg() + small.val + large.a;
return 1;
// CHECK: !args_cdb::byValue
// CHECK-G: !args_cdb.byValue
// CHECK-GC: !args_cdb::byValue
// CDB: dv /t
// CHECK: unsigned char ub = 0x01
@@ -61,16 +62,20 @@ int byValue(ubyte ub, ushort us, uint ui, ulong ul,
// CHECK-DAG: unsigned char [16] fa =
// CHECK-DAG: float [4] f4 =
// CHECK-DAG: double [4] d4 =
// CHECK-DAG: struct args_cdb::Small small =
// CHECK-G-DAG: struct args_cdb.Small small =
// CHECK-GC-DAG: struct args_cdb::Small small =
/*
* On Win64, `large` is emitted as reference, according to CodeViewDebug::calculateRanges()
* in llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp because of a CodeView limitation, as
* the pointer to the hidden copy is on the stack and not in a register.
* See the byValueShort() test below.
*/
// x86-DAG: struct args_cdb::Large large =
// x64-DAG: struct args_cdb::Large * large =
// CHECK-DAG: struct object::TypeInfo_Class * ti = {{0x[0-9a-f`]*}}
// CHECK-G-x86-DAG: struct args_cdb.Large large =
// CHECK-GC-x86-DAG: struct args_cdb::Large large =
// CHECK-G-x64-DAG: struct args_cdb.Large * large =
// CHECK-GC-x64-DAG: struct args_cdb::Large * large =
// CHECK-G-DAG: struct object.TypeInfo_Class * ti = {{0x[0-9a-f`]*}}
// CHECK-GC-DAG: struct object::TypeInfo_Class * ti = {{0x[0-9a-f`]*}}
// CHECK-DAG: void * np = {{0x[0`]*}}
// check arguments with indirections
@@ -102,15 +107,18 @@ int byValue(ubyte ub, ushort us, uint ui, ulong ul,
// CHECK: double 17
// CDB: ?? small
// CHECK: args_cdb::Small
// CHECK-G: args_cdb.Small
// CHECK-GC: args_cdb::Small
// CHECK-NEXT: val : 0x12
// CDB: ?? large
// CHECK: args_cdb::Large
// CHECK-G: args_cdb.Large
// CHECK-GC: args_cdb::Large
// CHECK-NEXT: a : 0x13
// CDB: ?? ti
// CHECK: object::TypeInfo_Class
// CHECK-G: object.TypeInfo_Class
// CHECK-GC: object::TypeInfo_Class
// CHECK-G-NEXT: m_init : byte[]
// CHECK-GC-NEXT: m_init : slice<byte>
}
@@ -123,15 +131,18 @@ int byValue(ubyte ub, ushort us, uint ui, ulong ul,
*/
size_t byValueShort(Large large)
{
// CDB: bp `args_cdb.d:126`
// CDB: bp `args_cdb.d:134`
// CDB: g
return large.a;
// CHECK: !args_cdb::byValueShort
// CHECK-G: !args_cdb.byValueShort
// CHECK-GC: !args_cdb::byValueShort
// CDB: dv /t
// CHECK: struct args_cdb::Large large = struct args_cdb::Large
// CHECK-G: struct args_cdb.Large large = struct args_cdb.Large
// CHECK-GC: struct args_cdb::Large large = struct args_cdb::Large
// CDB: ?? large
// CHECK: args_cdb::Large
// CHECK-G: args_cdb.Large
// CHECK-GC: args_cdb::Large
// CHECK-NEXT: a : 0x13
}
@@ -143,10 +154,11 @@ int byPtr(ubyte* ub, ushort* us, uint* ui, ulong* ul,
Small* small, Large* large,
TypeInfo_Class* ti, typeof(null)* np)
{
// CDB: bp `args_cdb.d:146`
// CDB: bp `args_cdb.d:157`
// CDB: g
return 3;
// CHECK: !args_cdb::byPtr
// CHECK-G: !args_cdb.byPtr
// CHECK-GC: !args_cdb::byPtr
// CDB: dv /t
// CDB: ?? *ub
// CHECK: unsigned char 0x01
@@ -189,14 +201,17 @@ int byPtr(ubyte* ub, ushort* us, uint* ui, ulong* ul,
// CDB: ?? (*d4)[2]
// CHECK: double 17
// CDB: ?? *small
// CHECK: struct args_cdb::Small
// CHECK-G: struct args_cdb.Small
// CHECK-GC: struct args_cdb::Small
// CHECK-NEXT: val : 0x12
// CDB: ?? *large
// CHECK: struct args_cdb::Large
// CHECK-G: struct args_cdb.Large
// CHECK-GC: struct args_cdb::Large
// CHECK-NEXT: a : 0x13
// CHECK-NEXT: b :
// CDB: ?? *ti
// CHECK: struct object::TypeInfo_Class
// CHECK-G: struct object.TypeInfo_Class
// CHECK-GC: struct object::TypeInfo_Class
// CHECK-G-NEXT: m_init : byte[]
// CHECK-GC-NEXT: m_init : slice<byte>
// CDB: ?? *np
@@ -211,9 +226,10 @@ int byRef(ref ubyte ub, ref ushort us, ref uint ui, ref ulong ul,
ref Small small, ref Large large,
ref TypeInfo_Class ti, ref typeof(null) np)
{
// CDB: bp `args_cdb.d:214`
// CDB: bp `args_cdb.d:229`
// CDB: g
// CHECK: !args_cdb::byRef
// CHECK-G: !args_cdb.byRef
// CHECK-GC: !args_cdb::byRef
// CDB: dv /t
// cdb displays references as pointers
@@ -257,14 +273,17 @@ int byRef(ref ubyte ub, ref ushort us, ref uint ui, ref ulong ul,
// CDB: ?? (*d4)[2]
// CHECK: double 17
// CDB: ?? *small
// CHECK: struct args_cdb::Small
// CHECK-G: struct args_cdb.Small
// CHECK-GC: struct args_cdb::Small
// CHECK-NEXT: val : 0x12
// CDB: ?? *large
// CHECK: struct args_cdb::Large
// CHECK-G: struct args_cdb.Large
// CHECK-GC: struct args_cdb::Large
// CHECK-NEXT: a : 0x13
// CHECK-NEXT: b :
// CDB: ?? *ti
// CHECK: struct object::TypeInfo_Class * {{0x[0-9a-f`]*}}
// CHECK-G: struct object.TypeInfo_Class * {{0x[0-9a-f`]*}}
// CHECK-GC: struct object::TypeInfo_Class * {{0x[0-9a-f`]*}}
// CHECK-G-NEXT: m_init : byte[]
// CHECK-GC-NEXT: m_init : slice<byte>
// CDB: ?? *np
@@ -26,11 +26,11 @@ int main(string[] args)
// CDB: bp `baseclass_cdb.d:28`
// CDB: g
return 0;
// CHECK: !baseclass_cdb::D main
// CHECK: !baseclass_cdb.D main
// CDB: ?? dc
// cdb doesn't show base class info, but lists their members
// CHECK: baseclass_cdb::DerivedClass
// CHECK: baseclass_cdb.DerivedClass
// CHECK: baseMember{{ *: *3}}
// verify baseMember is not listed twice
// CHECK-NEXT: derivedMember{{ *: *7}}
@@ -42,7 +42,7 @@ int basic_types()
// CDB: ld basictypes_cdb*
// CDB: bp `basictypes_cdb.d:41`
// CDB: g
// CHECK: !basictypes_cdb::basic_types
// CHECK: !basictypes_cdb.basic_types
// enable case sensitive symbol lookup
// CDB: .symopt-1
@@ -26,7 +26,7 @@ template Template(int N)
{
// CDB: bp `scopes_cdb.d:27`
// CDB: g
// CHECK-G: !scopes_cdb::Template!1::foo+
// CHECK-G: !scopes_cdb.Template!1.foo+
// CHECK-GC: !scopes_cdb::Template<1>::foo+
}
}
@@ -37,15 +37,16 @@ extern (C++, cppns)
{
// CDB: bp `scopes_cdb.d:38`
// CDB: g
// CHECK: !scopes_cdb::cppns::cppFoo+
// CHECK-G: !scopes_cdb.cppns.cppFoo+
// CHECK-GC: !scopes_cdb::cppns::cppFoo+
}
}
void templatedFoo(int N)()
{
// CDB: bp `scopes_cdb.d:46`
// CDB: bp `scopes_cdb.d:47`
// CDB: g
// CHECK-G: !scopes_cdb::templatedFoo!2+
// CHECK-G: !scopes_cdb.templatedFoo!2+
// CHECK-GC: !scopes_cdb::templatedFoo<2>+
}
@@ -54,9 +55,10 @@ mixin template Mixin(T)
T mixedInField;
void mixedInFoo()
{
// CDB: bp `scopes_cdb.d:57`
// CDB: bp `scopes_cdb.d:58`
// CDB: g
// CHECK: !scopes_cdb::S::mixedInFoo+
// CHECK-G: !scopes_cdb.S.mixedInFoo+
// CHECK-GC: !scopes_cdb::S::mixedInFoo+
}
}
@@ -81,9 +83,9 @@ void test()
T[N] field;
void foo()
{
// CDB: bp `scopes_cdb.d:84`
// CDB: bp `scopes_cdb.d:86`
// CDB: g
// CHECK-G: !scopes_cdb::test::TemplatedNestedStruct!(S, 3)::foo+
// CHECK-G: !scopes_cdb.test.TemplatedNestedStruct!(S, 3).foo+
// CHECK-GC: !scopes_cdb::test::TemplatedNestedStruct<S, 3>::foo+
}
}
@@ -96,22 +98,25 @@ void test()
int field;
void foo()
{
// CDB: bp `scopes_cdb.d:99`
// CDB: bp `scopes_cdb.d:101`
// CDB: g
// CHECK: !scopes_cdb::test::NestedStruct::foo+
// CHECK-G: !scopes_cdb.test.NestedStruct.foo+
// CHECK-GC: !scopes_cdb::test::NestedStruct::foo+
}
}
NestedStruct ns;
ns.foo();
// CDB: bp `scopes_cdb.d:108`
// CDB: bp `scopes_cdb.d:111`
// CDB: g
// CDB: dv /t
// CHECK: struct scopes_cdb::S s =
// CHECK-G-NEXT: struct scopes_cdb::test::TemplatedNestedStruct!(S, 3) tns =
// CHECK-G: struct scopes_cdb.S s =
// CHECK-GC: struct scopes_cdb::S s =
// CHECK-G-NEXT: struct scopes_cdb.test.TemplatedNestedStruct!(S, 3) tns =
// CHECK-GC-NEXT: struct scopes_cdb::test::TemplatedNestedStruct<S, 3> tns =
// CHECK-NEXT: struct scopes_cdb::test::NestedStruct ns =
// CHECK-G-NEXT: struct scopes_cdb.test.NestedStruct ns =
// CHECK-GC-NEXT: struct scopes_cdb::test::NestedStruct ns =
}
void main()
@@ -20,7 +20,7 @@ int main(string[] args)
// CDB: bp `strings_cdb.d:22`
// CDB: g
return 0;
// CHECK: !strings_cdb::D main
// CHECK: !strings_cdb.D main
// CDB: dt string
// CHECK: !string

0 comments on commit c3ba743

Please sign in to comment.