[PATCH] D28913: ThinLTOBitcodeWriter: Strip debug info from merged module.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 12:55:31 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294511: ThinLTOBitcodeWriter: Strip debug info from merged module. (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D28913?vs=85015&id=87696#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28913
Files:
llvm/trunk/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split.ll
Index: llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split.ll
===================================================================
--- llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split.ll
+++ llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split.ll
@@ -26,3 +26,10 @@
; M1: !0 = !{i32 0, !"typeid"}
!0 = !{i32 0, !"typeid"}
+
+; M0: !llvm.dbg.cu
+; M1-NOT: !llvm.dbg.cu
+!llvm.dbg.cu = !{}
+
+!1 = !{i32 2, !"Debug Info Version", i32 3}
+!llvm.module.flags = !{!1}
Index: llvm/trunk/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+++ llvm/trunk/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
@@ -19,6 +19,7 @@
#include "llvm/Analysis/TypeMetadataUtils.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/IR/Constants.h"
+#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
@@ -261,6 +262,7 @@
ValueToValueMapTy VMap;
std::unique_ptr<Module> MergedM(CloneModule(&M, VMap, IsInMergedM));
+ StripDebugInfo(*MergedM);
filterModule(&M, [&](const GlobalValue *GV) { return !IsInMergedM(GV); });
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28913.87696.patch
Type: text/x-patch
Size: 1219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170208/26b5fce9/attachment.bin>
More information about the llvm-commits
mailing list