summaryrefslogtreecommitdiff
path: root/test/Object
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-03 15:57:14 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-03 15:57:14 +0000
commit09a7f6016ae87e97275e18ea662ff32a120c04a4 (patch)
tree15c0547b33564af50fbed3b5ad25c6c5e7140951 /test/Object
parent40d40dd44edbac3c20a4f3305f208ab48c2c219a (diff)
downloadllvm-09a7f6016ae87e97275e18ea662ff32a120c04a4.tar.gz
llvm-09a7f6016ae87e97275e18ea662ff32a120c04a4.tar.bz2
llvm-09a7f6016ae87e97275e18ea662ff32a120c04a4.tar.xz
Add support for gnu archives with a string table and no symtab.
While there, use early returns to reduce nesting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r--test/Object/Inputs/archive-test.a-gnu-no-symtab5
-rw-r--r--test/Object/nm-archive.test3
2 files changed, 8 insertions, 0 deletions
diff --git a/test/Object/Inputs/archive-test.a-gnu-no-symtab b/test/Object/Inputs/archive-test.a-gnu-no-symtab
new file mode 100644
index 0000000000..0a5b237a29
--- /dev/null
+++ b/test/Object/Inputs/archive-test.a-gnu-no-symtab
@@ -0,0 +1,5 @@
+!<arch>
+// 24 `
+a-very-long-file-name/
+
+/0 1372864788 1000 1000 100664 0 `
diff --git a/test/Object/nm-archive.test b/test/Object/nm-archive.test
index e35b4d431e..869bea849c 100644
--- a/test/Object/nm-archive.test
+++ b/test/Object/nm-archive.test
@@ -1,10 +1,13 @@
RUN: llvm-nm %p/Inputs/archive-test.a-coff-i386 \
RUN: | FileCheck %s -check-prefix COFF
+
RUN: llvm-as %p/Inputs/trivial.ll -o=%t1
RUN: rm -f %t2
RUN: llvm-ar rcs %t2 %t1
RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE
+Test we don't error with an archive with no symtab.
+RUN: llvm-nm %p/Inputs/archive-test.a-gnu-no-symtab
COFF: trivial-object-test.coff-i386:
COFF-NEXT: 00000000 d .data