Skip to content

Commit 6c3704d

Browse files
authored
StripSymbols: Query llvm.dbg.declare by intrinsic ID instead of name (#114836)
1 parent ffe96ad commit 6c3704d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/IPO/StripSymbols.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ static bool StripSymbolNames(Module &M, bool PreserveDbgInfo) {
142142
}
143143

144144
static bool stripDebugDeclareImpl(Module &M) {
145-
146-
Function *Declare = M.getFunction("llvm.dbg.declare");
145+
Function *Declare =
146+
Intrinsic::getDeclarationIfExists(&M, Intrinsic::dbg_declare);
147147
std::vector<Constant*> DeadConstants;
148148

149149
if (Declare) {

0 commit comments

Comments
 (0)