summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r--test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll4
-rw-r--r--test/CodeGen/X86/2008-03-14-SpillerCrash.ll4
-rw-r--r--test/CodeGen/X86/alias-error.ll5
-rw-r--r--test/CodeGen/X86/aliases.ll6
-rw-r--r--test/CodeGen/X86/x86-64-pic-10.ll4
5 files changed, 18 insertions, 5 deletions
diff --git a/test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll b/test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll
index c5d2a46f92..7e37ef5c40 100644
--- a/test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll
+++ b/test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll
@@ -1,4 +1,6 @@
; RUN: llc < %s -march=x86 | grep weak | count 2
@__gthrw_pthread_once = alias weak i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
-declare extern_weak i32 @pthread_once(i32*, void ()*)
+define weak i32 @pthread_once(i32*, void ()*) {
+ ret i32 0
+}
diff --git a/test/CodeGen/X86/2008-03-14-SpillerCrash.ll b/test/CodeGen/X86/2008-03-14-SpillerCrash.ll
index 8946415108..18b3714f85 100644
--- a/test/CodeGen/X86/2008-03-14-SpillerCrash.ll
+++ b/test/CodeGen/X86/2008-03-14-SpillerCrash.ll
@@ -45,4 +45,6 @@ bb383: ; preds = %bb374.us, %bb311.split
ret i64 0
}
-declare i64 @__wcstoll_l(i32*, i32**, i32, %struct.__locale_struct*) nounwind
+define i64 @__wcstoll_l(i32*, i32**, i32, %struct.__locale_struct*) nounwind {
+ ret i64 0
+}
diff --git a/test/CodeGen/X86/alias-error.ll b/test/CodeGen/X86/alias-error.ll
new file mode 100644
index 0000000000..89b0876a83
--- /dev/null
+++ b/test/CodeGen/X86/alias-error.ll
@@ -0,0 +1,5 @@
+; RUN: not llc < %s -mtriple=i686-pc-linux-gnu %s 2>&1 | FileCheck %s
+
+@a = external global i32
+@b = alias i32* @a
+; CHECK: b: Target doesn't support aliases to declarations
diff --git a/test/CodeGen/X86/aliases.ll b/test/CodeGen/X86/aliases.ll
index 025dcfedb6..d0a262d390 100644
--- a/test/CodeGen/X86/aliases.ll
+++ b/test/CodeGen/X86/aliases.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false | FileCheck %s
-@bar = external global i32
+@bar = global i32 42
; CHECK-DAG: .globl foo1
@foo1 = alias i32* @bar
@@ -10,7 +10,9 @@
%FunTy = type i32()
-declare i32 @foo_f()
+define i32 @foo_f() {
+ ret i32 0
+}
; CHECK-DAG: .weak bar_f
@bar_f = alias weak %FunTy* @foo_f
diff --git a/test/CodeGen/X86/x86-64-pic-10.ll b/test/CodeGen/X86/x86-64-pic-10.ll
index 3ec172b2b6..da8082b925 100644
--- a/test/CodeGen/X86/x86-64-pic-10.ll
+++ b/test/CodeGen/X86/x86-64-pic-10.ll
@@ -9,4 +9,6 @@ entry:
ret void
}
-declare extern_weak i32 @f()
+define weak i32 @f() {
+ ret i32 42
+}