diff options
author | Devang Patel <dpatel@apple.com> | 2010-02-10 21:19:56 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-02-10 21:19:56 +0000 |
commit | df9292cbddfa634318e35ed58e9b8b9a464ee70f (patch) | |
tree | fc1d531132c36508dcdf4c0b4a32a31205c2babf /lib/Transforms/IPO | |
parent | 1b6c0605915a2f626b1d3aae6f8371924e0fffe7 (diff) | |
download | external_llvm-df9292cbddfa634318e35ed58e9b8b9a464ee70f.zip external_llvm-df9292cbddfa634318e35ed58e9b8b9a464ee70f.tar.gz external_llvm-df9292cbddfa634318e35ed58e9b8b9a464ee70f.tar.bz2 |
Strip new llvm.dbg.value intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/StripSymbols.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp index 0e0d83a..310e4a2 100644 --- a/lib/Transforms/IPO/StripSymbols.cpp +++ b/lib/Transforms/IPO/StripSymbols.cpp @@ -214,6 +214,15 @@ static bool StripDebugInfo(Module &M) { Changed = true; } + if (Function *DbgVal = M.getFunction("llvm.dbg.value")) { + while (!DbgVal->use_empty()) { + CallInst *CI = cast<CallInst>(DbgVal->use_back()); + CI->eraseFromParent(); + } + DbgVal->eraseFromParent(); + Changed = true; + } + NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.gv"); if (NMD) { Changed = true; |