mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-20 19:19:55 +00:00
a2197f8f51
We had two code paths. One would create names like "foo.1" and the other names like "foo1". For globals it is important to use "foo.1" to help C++ name demangling. For locals there is no strong reason to go one way or the other so I kept the most common mangling (foo1). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253804 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
659 B
LLVM
26 lines
659 B
LLVM
; RUN: llvm-link %s -override %S/Inputs/override-with-internal-linkage.ll -S | FileCheck %s
|
|
; RUN: llvm-link -override %S/Inputs/override-with-internal-linkage.ll %s -S | FileCheck %s
|
|
|
|
; CHECK-LABEL: define i32 @main(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: call i32 @foo.2(
|
|
define i32 @main(i32 %argc, i8** %argv) {
|
|
entry:
|
|
%a = call i32 @foo(i32 2)
|
|
ret i32 %a
|
|
}
|
|
|
|
; CHECK-LABEL: define internal i32 @foo.2(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: %add = add nsw i32 %i, %i
|
|
; CHECK-NEXT: ret i32 %add
|
|
define internal i32 @foo(i32 %i) {
|
|
entry:
|
|
%add = add nsw i32 %i, %i
|
|
ret i32 %add
|
|
}
|
|
|
|
; CHECK-LABEL: define i32 @foo(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: ret i32 4
|