summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-11-22 22:06:31 +0000
committerManman Ren <manman.ren@gmail.com>2013-11-22 22:06:31 +0000
commite6c749a3ec4ac77f1384834d4871bb5a588d40df (patch)
tree189b6488561f55b83c8c572a55f26087b16fb8d2 /include
parentbec50063a5e546b7f5786961500566f13984679b (diff)
downloadllvm-e6c749a3ec4ac77f1384834d4871bb5a588d40df.tar.gz
llvm-e6c749a3ec4ac77f1384834d4871bb5a588d40df.tar.bz2
llvm-e6c749a3ec4ac77f1384834d4871bb5a588d40df.tar.xz
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/trunk@195505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/DebugInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index 07bd832bde..0ff7d85682 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,