Add a pass to name anonymous/nameless function
authorMehdi Amini <mehdi.amini@apple.com>
Tue, 12 Apr 2016 21:35:28 +0000 (21:35 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Tue, 12 Apr 2016 21:35:28 +0000 (21:35 +0000)
commitd5faa267c4a7856491aadc30d3f006a6c9237873
tree346113d52b9b057366a7c2384ea94390a9d718f6
parent68da426eeaea586d8e21fe1a18b2220630ba22ac
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
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/Scalar.h
llvm/include/llvm/Transforms/Utils/ModuleUtils.h
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/lib/Transforms/Utils/CMakeLists.txt
llvm/lib/Transforms/Utils/NameAnonFunctions.cpp [new file with mode: 0644]
llvm/lib/Transforms/Utils/Utils.cpp
llvm/test/Transforms/NameAnonFunctions/rename.ll [new file with mode: 0644]