view test/tools/llvm-split/comdat.ll @ 147:c2174574ed3a

LLVM 10
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 16:55:33 +0900
parents afa8332a0e37
children
line wrap: on
line source

; RUN: llvm-split -o %t %s
; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s

$foo = comdat any

; CHECK0: define void @foo()
; CHECK1: declare void @foo()
define void @foo() comdat {
  call void @bar()
  ret void
}

; CHECK0: define void @bar()
; CHECK1: declare void @bar()
define void @bar() comdat($foo) {
  call void @foo()
  ret void
}