This module will contain nothing but vtable definitions and (soon)
available_externally function definitions, so there is no point in keeping
debug info in the module.
Differential Revision: https://reviews.llvm.org/D28913
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294511
91177308-0d34-0410-b5e6-
96231b3b80d8
#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"
ValueToValueMapTy VMap;
std::unique_ptr<Module> MergedM(CloneModule(&M, VMap, IsInMergedM));
+ StripDebugInfo(*MergedM);
filterModule(&M, [&](const GlobalValue *GV) { return !IsInMergedM(GV); });
; 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}