summaryrefslogtreecommitdiff
path: root/test/Transforms/FunctionResolve/2003-10-21-GlobalResolveHack.ll
blob: 0865f0d923029a6925b85cbc2cefcd1d7a8cc048 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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-upgrade < %s | llvm-as | 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, uint 0
  ret int* %P
}