1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/Assembler/metadata-function-local.ll
Duncan P. N. Exon Smith e0106d31c8 Assembler: Rewrite test for function-local metadata
This test for function-local metadata did strange things, and never
really sent in valid arguments for `llvm.dbg.declare` and
`llvm.dbg.value` intrinsics.  Those that might have once been valid have
bitrotted.

Rewrite it to be a targeted test for function-local metadata --
unrelated to debug info, which is tested elsewhere -- and rename it to
better match other metadata-related tests.

(Note: the scope of function-local metadata changed drastically during
the metadata/value split, but I didn't properly clean up this testcase.
Most of the IR in this file, while invalid for debug info intrinsics,
used to provide coverage for various (now illegal) forms of
function-local metadata.)

llvm-svn: 232290
2015-03-15 00:45:51 +00:00

21 lines
602 B
LLVM

; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
declare void @llvm.metadata(metadata)
define void @foo(i32 %arg) {
entry:
%before = alloca i32
call void @llvm.metadata(metadata i32 %arg)
call void @llvm.metadata(metadata i32* %after)
call void @llvm.metadata(metadata i32* %before)
%after = alloca i32
ret void
; CHECK: %before = alloca i32
; CHECK: call void @llvm.metadata(metadata i32 %arg)
; CHECK: call void @llvm.metadata(metadata i32* %after)
; CHECK: call void @llvm.metadata(metadata i32* %before)
; CHECK: %after = alloca i32
}