[llvm-nm] Print out N_COLD_FUNC as "cold func"

Per post-commit feedback from Mike, have llvm-nm print out this symbol
attribute as "[cold func]".

llvm-svn: 352258
This commit is contained in:
Vedant Kumar 2019-01-26 00:33:15 +00:00
parent 3749befe74
commit 8ca0875617
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
RUN: llc -O0 -mtriple=aarch64-apple-ios %p/Inputs/cold-func.ll -filetype=obj -o %t.aarch64.o
RUN: llvm-nm -m %t.aarch64.o | FileCheck %s
CHECK: [cold] _cold_func
CHECK: [cold func] _cold_func

View File

@ -557,7 +557,7 @@ static void darwinPrintSymbol(SymbolicFile &Obj, SymbolListT::iterator I,
if (Filetype == MachO::MH_OBJECT &&
((NType & MachO::N_TYPE) != MachO::N_UNDF) &&
(NDesc & MachO::N_COLD_FUNC) == MachO::N_COLD_FUNC)
outs() << "[cold] ";
outs() << "[cold func] ";
if ((NDesc & MachO::N_ARM_THUMB_DEF) == MachO::N_ARM_THUMB_DEF)
outs() << "[Thumb] ";