summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/GlobalOpt/alias-resolve.ll5
-rw-r--r--llvm/test/Transforms/GlobalOpt/alias-used-section.ll8
2 files changed, 9 insertions, 4 deletions
diff --git a/llvm/test/Transforms/GlobalOpt/alias-resolve.ll b/llvm/test/Transforms/GlobalOpt/alias-resolve.ll
index 32f4bf8ebe2..5e229b94268 100644
--- a/llvm/test/Transforms/GlobalOpt/alias-resolve.ll
+++ b/llvm/test/Transforms/GlobalOpt/alias-resolve.ll
@@ -1,7 +1,4 @@
-; We use a temporary file so that the test fails when opt crashes.
-
-; RUN: opt < %s -globalopt -S > %t
-; RUN: FileCheck %s < %t
+; RUN: opt < %s -globalopt -S | FileCheck %s
@foo1 = alias void ()* @foo2
; CHECK: @foo1 = alias void ()* @foo2
diff --git a/llvm/test/Transforms/GlobalOpt/alias-used-section.ll b/llvm/test/Transforms/GlobalOpt/alias-used-section.ll
new file mode 100644
index 00000000000..987c4a4926d
--- /dev/null
+++ b/llvm/test/Transforms/GlobalOpt/alias-used-section.ll
@@ -0,0 +1,8 @@
+; RUN: opt -S -globalopt < %s | FileCheck %s
+
+@_Z17in_custom_section = internal global i8 42, section "CUSTOM"
+@in_custom_section = protected dllexport alias internal i8* @_Z17in_custom_section
+
+; CHECK: @in_custom_section = internal protected dllexport global i8 42, section "CUSTOM"
+
+@llvm.used = appending global [1 x i8*] [i8* @in_custom_section], section "llvm.metadata"
OpenPOWER on IntegriCloud