Skip to content

Commit

Permalink
[chore] Strip llvm.dbg.declare
Browse files Browse the repository at this point in the history
  • Loading branch information
Columpio authored and misonijnik committed Oct 20, 2023
1 parent 74cb168 commit d5c8825
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Module/Optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ static cl::opt<bool>
cl::desc("Strip debugger symbol info from executable"),
cl::init(false), cl::cat(klee::ModuleCat));

static cl::opt<bool>
StripDebugDeclare("strip-debug-declare",
cl::desc("Strip all llvm.dbg.declare intrinsics"),
cl::init(true), cl::cat(klee::ModuleCat));

static cl::alias A1("S", cl::desc("Alias for --strip-debug"),
cl::aliasopt(StripDebug));

Expand All @@ -98,6 +103,8 @@ static void AddStandardCompilePasses(legacy::PassManager &PM) {
// If the -strip-debug command line option was specified, do it.
if (StripDebug)
addPass(PM, createStripSymbolsPass(true));
if (StripDebugDeclare)
addPass(PM, createStripDebugDeclarePass());

addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
addPass(PM, createPromoteMemoryToRegisterPass()); // Kill useless allocas
Expand Down

0 comments on commit d5c8825

Please sign in to comment.