summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-23 23:38:17 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-23 23:38:17 +0000
commitae64eafd31781d6eee0b23a6d4d5f50d84d143ec (patch)
treebc8c443446d72c38213f5be27e2837d7ecc29009 /llvm/test/Bitcode
parentcb87494f4cbd4769c6769a752c2c9fb5c4e1bb00 (diff)
downloadbcm5719-llvm-ae64eafd31781d6eee0b23a6d4d5f50d84d143ec.tar.gz
bcm5719-llvm-ae64eafd31781d6eee0b23a6d4d5f50d84d143ec.zip
Store and emit original name in combined index
Summary: As discussed in D18298, some local globals can't be renamed/promoted (because they have a section, or because they are referenced from inline assembly). To be able to detect naming collision, we need to keep around the "GUID" using their original name without taking the linkage into account. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19454 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267304
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary-originalnames.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/thinlto-function-summary-originalnames.ll b/llvm/test/Bitcode/thinlto-function-summary-originalnames.ll
new file mode 100644
index 00000000000..431ce367e9b
--- /dev/null
+++ b/llvm/test/Bitcode/thinlto-function-summary-originalnames.ll
@@ -0,0 +1,24 @@
+; Test to check the callgraph in summary
+; RUN: opt -module-summary %s -o %t.o
+; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t.o
+; RUN: llvm-bcanalyzer -dump %t.index.bc | FileCheck %s --check-prefix=COMBINED
+
+; COMBINED: <GLOBALVAL_SUMMARY_BLOCK
+; COMBINED-NEXT: <COMBINED
+; COMBINED-NEXT: <COMBINED_ORIGINAL_NAME op0=6699318081062747564/>
+; COMBINED-NEXT: <COMBINED_GLOBALVAR_INIT_REFS
+; COMBINED-NEXT: <COMBINED_ORIGINAL_NAME op0=-2012135647395072713/>
+; COMBINED-NEXT: <COMBINED_ALIAS
+; COMBINED-NEXT: <COMBINED_ORIGINAL_NAME op0=-4170563161550796836/>
+; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
+
+; ModuleID = 'thinlto-function-summary-callgraph.ll'
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+@bar = internal global i32 0
+@fooalias = internal alias void (...), bitcast (void ()* @foo to void (...)*)
+
+define internal void @foo() {
+ ret void
+}
OpenPOWER on IntegriCloud