1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/test/CodeGen/X86/GC/cg-O0.ll
Mehdi Amini fe32b980b3 Make the default triple optional by allowing an empty string
When building LLVM as a (potentially dynamic) library that can be linked against
by multiple compilers, the default triple is not really meaningful.
We allow to explicitely set it to an empty string when configuring LLVM.
In this case, said "target independent" tests in the test suite that are using
the default triple are disabled by matching the newly available feature
"default_triple".

Reviewers: probinson, echristo
Differential Revision: http://reviews.llvm.org/D12660

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247775
2015-09-16 05:34:32 +00:00

19 lines
330 B
LLVM

; RUN: llc < %s -O0
; REQUIRES: default_triple
define i32 @main() {
entry:
call void @f()
ret i32 0
}
define void @f() gc "ocaml" {
entry:
%ptr.stackref = alloca i8*
%gcroot = bitcast i8** %ptr.stackref to i8**
call void @llvm.gcroot(i8** %gcroot, i8* null)
ret void
}
declare void @llvm.gcroot(i8**, i8*) nounwind