mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-30 23:20:54 +00:00
5a70dd1d82
Similar to gep (r230786) and load (r230794) changes. Similar migration script can be used to update test cases, which successfully migrated all of LLVM and Polly, but about 4 test cases needed manually changes in Clang. (this script will read the contents of stdin and massage it into stdout - wrap it in the 'apply.sh' script shown in previous commits + xargs to apply it over a large set of test cases) import fileinput import sys import re rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL) def conv(match): line = match.group(1) line += match.group(4) line += ", " line += match.group(2) return line line = sys.stdin.read() off = 0 for match in re.finditer(rep, line): sys.stdout.write(line[off:match.start()]) sys.stdout.write(conv(match)) off = match.end() sys.stdout.write(line[off:]) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232184 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
1.7 KiB
LLVM
36 lines
1.7 KiB
LLVM
; RUN: llvm-as %s -o %t1.bc
|
|
; RUN: llvm-as < %p/2004-05-07-TypeResolution2.ll -o %t2.bc
|
|
; RUN: llvm-link -o %t3.bc %t1.bc %t2.bc
|
|
|
|
target datalayout = "e-p:32:32"
|
|
%myint = type opaque
|
|
%struct1 = type { i32, void (%struct2*)*, %myint*, i32 (i32*)* }
|
|
%struct2 = type { %struct1 }
|
|
@driver1 = global %struct1 zeroinitializer ; <%struct1*> [#uses=1]
|
|
@m1 = external global [1 x i8]* ; <[1 x i8]**> [#uses=0]
|
|
@str1 = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=0]
|
|
@str2 = constant [2 x i8] zeroinitializer ; <[2 x i8]*> [#uses=0]
|
|
@str3 = constant [3 x i8] zeroinitializer ; <[3 x i8]*> [#uses=0]
|
|
@str4 = constant [4 x i8] zeroinitializer ; <[4 x i8]*> [#uses=0]
|
|
@str5 = constant [5 x i8] zeroinitializer ; <[5 x i8]*> [#uses=0]
|
|
@str6 = constant [6 x i8] zeroinitializer ; <[6 x i8]*> [#uses=0]
|
|
@str7 = constant [7 x i8] zeroinitializer ; <[7 x i8]*> [#uses=0]
|
|
@str8 = constant [8 x i8] zeroinitializer ; <[8 x i8]*> [#uses=0]
|
|
@str9 = constant [9 x i8] zeroinitializer ; <[9 x i8]*> [#uses=0]
|
|
@stra = constant [10 x i8] zeroinitializer ; <[10 x i8]*> [#uses=0]
|
|
@strb = constant [11 x i8] zeroinitializer ; <[11 x i8]*> [#uses=0]
|
|
@strc = constant [12 x i8] zeroinitializer ; <[12 x i8]*> [#uses=0]
|
|
@strd = constant [13 x i8] zeroinitializer ; <[13 x i8]*> [#uses=0]
|
|
@stre = constant [14 x i8] zeroinitializer ; <[14 x i8]*> [#uses=0]
|
|
@strf = constant [15 x i8] zeroinitializer ; <[15 x i8]*> [#uses=0]
|
|
@strg = constant [16 x i8] zeroinitializer ; <[16 x i8]*> [#uses=0]
|
|
@strh = constant [17 x i8] zeroinitializer ; <[17 x i8]*> [#uses=0]
|
|
|
|
declare void @func(%struct2*)
|
|
|
|
define void @tty_init() {
|
|
entry:
|
|
store volatile void (%struct2*)* @func, void (%struct2*)** getelementptr (%struct1, %struct1* @driver1, i64 0, i32 1)
|
|
ret void
|
|
}
|