summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-22 03:35:18 +0000
committerChris Lattner <sabre@nondot.org>2003-10-22 03:35:18 +0000
commitf4e643ffe007fd02de9073186becab1dcf13f367 (patch)
treeee7b8c9c0bf04e3e73ec8458343f914c9b9a58a6 /test
parent523b30cb59956f9e00506e3ec1bc4463ca77cf30 (diff)
downloadllvm-f4e643ffe007fd02de9073186becab1dcf13f367.tar.gz
llvm-f4e643ffe007fd02de9073186becab1dcf13f367.tar.bz2
llvm-f4e643ffe007fd02de9073186becab1dcf13f367.tar.xz
New testcase for fun hack that is absolutely necessary for the C++ stdlib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll b/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll
new file mode 100644
index 0000000000..694dbc2217
--- /dev/null
+++ b/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll
@@ -0,0 +1,14 @@
+; This tests a hack put into place specifically for the C++ libstdc++ library.
+; It uses an ugly hack which is cleaned up by the funcresolve pass.
+
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | grep %X | grep '{'
+
+%X = external global { int }
+%X = global [ 4 x sbyte ] zeroinitializer
+
+implementation
+
+int* %test() {
+ %P = getelementptr {int}* %X, long 0, ubyte 0
+ ret int* %P
+}