1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/Transforms/NameAnonFunctions/rename.ll
Mehdi Amini 6875fa5607 Add a pass to name anonymous/nameless function
Summary:
For correct handling of alias to nameless
function, we need to be able to refer them through a GUID in the summary.
Here we name them using a hash of the non-private global names in the module.

Reviewers: tejohnson

Subscribers: joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D18883

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266132
2016-04-12 21:35:28 +00:00

28 lines
564 B
LLVM

; RUN: opt -S -name-anon-functions < %s | FileCheck %s
; foo contribute to the unique hash for the module
define void @foo() {
ret void
}
; bar is internal, and does not contribute to the unique hash for the module
define internal void @bar() {
ret void
}
; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.0()
; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.1()
; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.2()
define void @0() {
ret void
}
define void @1() {
ret void
}
define void @2() {
ret void
}