[BOLT,RISCV] Remove empty name special case from #68977
The special case is unneeded after #89693. Pull Request: https://github.com/llvm/llvm-project/pull/90004
This commit is contained in:
@@ -1725,12 +1725,6 @@ void RewriteInstance::adjustFunctionBoundaries() {
|
||||
if (!Function.isSymbolValidInScope(Symbol, SymbolSize))
|
||||
break;
|
||||
|
||||
// Ignore unnamed symbols. Used, for example, by debugging info on RISC-V.
|
||||
if (BC->isRISCV() && cantFail(Symbol.getName()).empty()) {
|
||||
++NextSymRefI;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip basic block labels. This happens on RISC-V with linker relaxation
|
||||
// enabled because every branch needs a relocation and corresponding
|
||||
// symbol. We don't want to add such symbols as entry points.
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
// RUN: %clang %cflags -g -Wl,-q -o %t %s
|
||||
|
||||
/// Verify that the binary indeed contains an unnamed symbol at _start
|
||||
/// Verify that the binary indeed contains a fake label ".L0 " at _start.
|
||||
// RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=CHECK-ELF
|
||||
// CHECK-ELF-DAG: [[#%x,START:]] {{.*}} FUNC GLOBAL DEFAULT [[#%d,SECTION:]] _start{{$}}
|
||||
// CHECK-ELF-DAG: [[#%x,START]] {{.*}} NOTYPE LOCAL DEFAULT [[#SECTION]] .L0 {{$}}
|
||||
|
||||
/// Verify that BOLT did not create an extra entry point for the unnamed symbol
|
||||
/// Verify that BOLT did not create an extra entry point for the fake label.
|
||||
// RUN: llvm-bolt -o %t.bolt %t --print-cfg | FileCheck %s
|
||||
// CHECK: Binary Function "_start" after building cfg {
|
||||
// CHECK: IsMultiEntry: 0
|
||||
Reference in New Issue
Block a user