[llvm] r352258 - [llvm-nm] Print out N_COLD_FUNC as "cold func"
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 25 16:33:15 PST 2019
Author: vedantk
Date: Fri Jan 25 16:33:15 2019
New Revision: 352258
URL: http://llvm.org/viewvc/llvm-project?rev=352258&view=rev
Log:
[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]".
Modified:
llvm/trunk/test/tools/llvm-nm/AArch64/macho-cold.test
llvm/trunk/tools/llvm-nm/llvm-nm.cpp
Modified: llvm/trunk/test/tools/llvm-nm/AArch64/macho-cold.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-nm/AArch64/macho-cold.test?rev=352258&r1=352257&r2=352258&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-nm/AArch64/macho-cold.test (original)
+++ llvm/trunk/test/tools/llvm-nm/AArch64/macho-cold.test Fri Jan 25 16:33:15 2019
@@ -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
Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=352258&r1=352257&r2=352258&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Fri Jan 25 16:33:15 2019
@@ -557,7 +557,7 @@ static void darwinPrintSymbol(SymbolicFi
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] ";
More information about the llvm-commits
mailing list