aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/COFF
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-10-08 00:00:28 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-10-08 00:00:28 +0000
commitadab850daaed40bc022bd4f37ff643154a9e2bd1 (patch)
treebee5f8ded8007bd017a6a5beec1f5b14201b45ba /test/MC/COFF
parenta2283761857d86a3a168705cef8108828d874876 (diff)
downloadexternal_llvm-adab850daaed40bc022bd4f37ff643154a9e2bd1.zip
external_llvm-adab850daaed40bc022bd4f37ff643154a9e2bd1.tar.gz
external_llvm-adab850daaed40bc022bd4f37ff643154a9e2bd1.tar.bz2
MC-COFF: Add test for my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/COFF')
-rw-r--r--test/MC/COFF/simple-fixups.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/MC/COFF/simple-fixups.ll b/test/MC/COFF/simple-fixups.ll
new file mode 100644
index 0000000..c2fb42e
--- /dev/null
+++ b/test/MC/COFF/simple-fixups.ll
@@ -0,0 +1,29 @@
+; The purpose of this test is to verify that we do not produce unneeded
+; relocations when symbols are in the same section and we know their offset.
+
+; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
+; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | coff-dump.py | FileCheck %s
+
+define void @foo() {
+e:
+ br label %i
+i:
+ br label %i
+}
+
+define void @bar() {
+e:
+ br label %i
+i:
+ br label %i
+}
+
+define void @baz() {
+e:
+ call void @baz()
+ ret void
+}
+
+; CHECK: Sections = [
+; CHECK-NOT: NumberOfRelocations = {{[^0]}}
+; CHECK: Symbols = [