ThinLTOBitcodeWriter: Do not include module-level inline asm in the merged module.
If the inline asm provides the definition of a symbol, this can result
in duplicate symbol errors.
Differential Revision: https://reviews.llvm.org/D42944
llvm-svn: 324313
diff --git a/llvm/test/Transforms/ThinLTOBitcodeWriter/module-asm.ll b/llvm/test/Transforms/ThinLTOBitcodeWriter/module-asm.ll
new file mode 100644
index 0000000..15e4778
--- /dev/null
+++ b/llvm/test/Transforms/ThinLTOBitcodeWriter/module-asm.ll
@@ -0,0 +1,12 @@
+; RUN: opt -thinlto-bc -o %t %s
+; RUN: llvm-modextract -b -n 0 -o - %t | llvm-dis | FileCheck --check-prefix=M0 %s
+; RUN: llvm-modextract -b -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=M1 %s
+
+target triple = "x86_64-unknown-linux-gnu"
+
+@g = constant i32 0, !type !0
+!0 = !{i32 0, !"typeid"}
+
+; M0: module asm "ret"
+; M1-NOT: module asm
+module asm "ret"