Please see D93747 for more context which tries to make linkage names of internal linkage functions to be the uniqueified names. This causes a problem with gdb because breaking using the demangled function name will not work if the new uniqueified name cannot be demangled. The problem is the generated suffix which is a mix of integers and letters which do not demangle. The demangler accepts either all numbers or all letters. This patch simply converts the hash to decimal. There is no loss of uniqueness by doing this as the precision is maintained. The symbol names get longer by a few characters though. Differential Revision: https://reviews.llvm.org/D94154
15 lines
410 B
LLVM
15 lines
410 B
LLVM
; RUN: opt -S -unique-internal-linkage-names < %s | FileCheck %s
|
|
; RUN: opt -S -passes=unique-internal-linkage-names < %s | FileCheck %s
|
|
|
|
source_filename = "foo.c"
|
|
|
|
@glob = internal global i32 0
|
|
|
|
define internal i32 @foo() {
|
|
entry:
|
|
ret i32 0
|
|
}
|
|
|
|
; CHECK: @glob.__uniq.142098474322525230676991677820000238157 = internal global
|
|
; CHECK: define internal i32 @foo.__uniq.142098474322525230676991677820000238157()
|