1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Other/copy-metadata-of-declaration.ll
Ruiling Song d4718580b5 [Cloning] Copy metadata of global declarations
We have modules with metadata on declarations, and out-of-tree passes
use that metadata, and we need to clone those modules. We really expect
such metadata is kept during the clone operation.

Reviewed by: arsenm, aprantl

Differential Revision: https://reviews.llvm.org/D93451
2021-01-08 08:21:18 +08:00

11 lines
347 B
LLVM

; RUN: opt -run-twice -verify -S -o - %s | FileCheck %s
; This test is used to check metadata attached to global variable declarations
; are copied when CloneModule(). This is required by out-of-tree passes.
; CHECK: @g = external addrspace(64) global i32, !spirv.InOut !0
@g = external addrspace(64) global i32, !spirv.InOut !0
!0 = !{i32 1}