From 5015aa854dc043b2ae5d95e04e00d98518207ce5 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 26 Apr 2019 16:21:51 +0000 Subject: [PATCH] [ThinLTO] Fix X86/strong_non_prevailing.ll after llvm-nm 'r' change llvm-svn: 359314 --- llvm/test/ThinLTO/X86/strong_non_prevailing.ll | 4 ++-- llvm/tools/llvm-nm/llvm-nm.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm/test/ThinLTO/X86/strong_non_prevailing.ll b/llvm/test/ThinLTO/X86/strong_non_prevailing.ll index f96e23a..214af64 100644 --- a/llvm/test/ThinLTO/X86/strong_non_prevailing.ll +++ b/llvm/test/ThinLTO/X86/strong_non_prevailing.ll @@ -12,5 +12,5 @@ $__llvm_profile_filename = comdat any @__llvm_profile_filename = constant [19 x i8] c"default_%m.profraw\00", comdat -; EXPORTED: N __llvm_profile_filename -; NOT_EXPORTED-NOT: N __llvm_profile_filename +; EXPORTED: R __llvm_profile_filename +; NOT_EXPORTED-NOT: R __llvm_profile_filename diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp index ebb2c3d..8f73fcc 100644 --- a/llvm/tools/llvm-nm/llvm-nm.cpp +++ b/llvm/tools/llvm-nm/llvm-nm.cpp @@ -928,6 +928,9 @@ static char getSymbolNMTypeChar(ELFObjectFileBase &Obj, // OK, this is ELF elf_symbol_iterator SymI(I); + if (SymI->getELFType() == ELF::STT_GNU_IFUNC) + return 'i'; + Expected SecIOrErr = SymI->getSection(); if (!SecIOrErr) { consumeError(SecIOrErr.takeError()); -- 2.7.4