Fix PR25101 - Handle anonymous functions without VST entries
Summary:
The change to use the VST function entries for lazy deserialization did
not handle the case of anonymous functions without aliases. In that case
we must fall back to scanning the function blocks as there is no VST
entry.
Reviewers: dexonsmith, joker.eph, davidxl
Subscribers: tstellarAMD, llvm-commits
Differential Revision: http://reviews.llvm.org/D13596
llvm-svn: 249947
diff --git a/llvm/test/Bitcode/anon-functions.ll b/llvm/test/Bitcode/anon-functions.ll
new file mode 100644
index 0000000..b68cc8e
--- /dev/null
+++ b/llvm/test/Bitcode/anon-functions.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llvm-dis | FileCheck %s
+; PR25101
+
+; CHECK: define void @0()
+define void @0() {
+ ret void
+}
+
+; CHECK: define void @f()
+define void @f() {
+ ret void
+}
+
+; CHECK: define void @1()
+define void @1() {
+ ret void
+}
+