From c877b10446669bf107c19cab78b920ce9cffb989 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 9 Dec 2013 21:00:02 +0000 Subject: Merging r195505: ------------------------------------------------------------------------ r195505 | mren | 2013-11-22 14:06:31 -0800 (Fri, 22 Nov 2013) | 8 lines Debug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp. We can share the implementation between StripSymbols and dropping debug info for metadata versions that do not match. Also update the comments to match the implementation. A follow-on patch will drop the "Debug Info Version" module flag in StripDebugInfo. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196816 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index 07bd832..0ff7d85 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -753,6 +753,12 @@ DIVariable cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext); /// Construct DITypeIdentifierMap by going through retained types of each CU. DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes); +/// Strip debug info in the module if it exists. +/// To do this, we remove all calls to the debugger intrinsics and any named +/// metadata for debugging. We also remove debug locations for instructions. +/// Return true if module is modified. +bool StripDebugInfo(Module &M); + /// DebugInfoFinder tries to list all debug info MDNodes used in a module. To /// list debug info MDNodes used by an instruction, DebugInfoFinder uses /// processDeclare, processValue and processLocation to handle DbgDeclareInst, -- cgit v1.1