[llvm] r235730 - Linker: Update -override testcase to check callers
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Apr 24 09:56:24 PDT 2015
Author: dexonsmith
Date: Fri Apr 24 11:56:24 2015
New Revision: 235730
URL: http://llvm.org/viewvc/llvm-project?rev=235730&view=rev
Log:
Linker: Update -override testcase to check callers
Check that `@main` is calling `@foo2` (the renamed internal function),
not the `@foo` with external linkage that's been pulled in from the
override file.
Modified:
llvm/trunk/test/Linker/override-with-internal-linkage.ll
Modified: llvm/trunk/test/Linker/override-with-internal-linkage.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/override-with-internal-linkage.ll?rev=235730&r1=235729&r2=235730&view=diff
==============================================================================
--- llvm/trunk/test/Linker/override-with-internal-linkage.ll (original)
+++ llvm/trunk/test/Linker/override-with-internal-linkage.ll Fri Apr 24 11:56:24 2015
@@ -1,23 +1,25 @@
; 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 internal i32 @foo2
+; CHECK-LABEL: define i32 @main(
; CHECK-NEXT: entry:
-; CHECK-NEXT: %add = add nsw i32 %i, %i
-; CHECK-NEXT: ret i32 %add
+; CHECK-NEXT: call i32 @foo2(
+define i32 @main(i32 %argc, i8** %argv) {
+entry:
+ %a = call i32 @foo(i32 2)
+ ret i32 %a
+}
-; CHECK-LABEL: define i32 @foo
+; CHECK-LABEL: define internal i32 @foo2(
; CHECK-NEXT: entry:
-; CHECK-NEXT: ret i32 4
+; 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
}
-; Function Attrs: nounwind ssp uwtable
-define i32 @main(i32 %argc, i8** %argv) {
-entry:
- %a = call i32 @foo(i32 2)
- ret i32 %a
-}
+; CHECK-LABEL: define i32 @foo(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i32 4
More information about the llvm-commits
mailing list