diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
commit | 3a0822f094b578157263e04114075ad7df81db41 (patch) | |
tree | bc48361fe2cd1ca5f93ac01b38b183774468fc79 /test/Object | |
parent | 85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff) |
Diffstat (limited to 'test/Object')
-rw-r--r-- | test/Object/Inputs/invalid-bad-rel-type.elf | bin | 0 -> 845 bytes | |||
-rw-r--r-- | test/Object/dllimport.ll | 17 | ||||
-rw-r--r-- | test/Object/invalid.test | 2 | ||||
-rw-r--r-- | test/Object/nm-archive.test | 9 |
4 files changed, 28 insertions, 0 deletions
diff --git a/test/Object/Inputs/invalid-bad-rel-type.elf b/test/Object/Inputs/invalid-bad-rel-type.elf Binary files differnew file mode 100644 index 000000000000..2caebcdd1e59 --- /dev/null +++ b/test/Object/Inputs/invalid-bad-rel-type.elf diff --git a/test/Object/dllimport.ll b/test/Object/dllimport.ll new file mode 100644 index 000000000000..afdb4562cc9f --- /dev/null +++ b/test/Object/dllimport.ll @@ -0,0 +1,17 @@ +; RUN: llvm-as %s -o - | llvm-nm - | FileCheck %s + +target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-windows-msvc" + +; CHECK: U __imp_f +; CHECK: U __imp_v +; CHECK: T g + +declare dllimport void @f() +@v = external dllimport global i32 + +define void @g() { + call void @f() + store i32 42, i32* @v + ret void +} diff --git a/test/Object/invalid.test b/test/Object/invalid.test new file mode 100644 index 000000000000..73bf62a1ed4e --- /dev/null +++ b/test/Object/invalid.test @@ -0,0 +1,2 @@ +RUN: not llvm-dwarfdump %p/Inputs/invalid-bad-rel-type.elf 2>&1 | FileCheck %s +CHECK: Invalid data was encountered while parsing the file diff --git a/test/Object/nm-archive.test b/test/Object/nm-archive.test index a9ae9cbbfbd6..4cd58d33cf28 100644 --- a/test/Object/nm-archive.test +++ b/test/Object/nm-archive.test @@ -24,6 +24,15 @@ RUN: rm -f %t2 RUN: llvm-ar rcs %t2 %t1 RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE +RUN: rm -f %t2 +RUN: llvm-lib /out:%t2 %t1 +RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE + +RUN: rm -f %t2 +RUN: echo /out:%t2 %t1 > %t.rsp +RUN: llvm-lib @%t.rsp +RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE + BITCODE: U SomeOtherFunction BITCODE-NEXT: T main BITCODE-NEXT: U puts |