summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 3481c00..31e6bef 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -26,7 +26,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
-
+#include "llvm/Transforms/Utils/DbgInfoUtils.h"
using namespace llvm;
@@ -89,7 +89,12 @@ bool ADCE::runOnFunction(Function& F) {
(*I)->eraseFromParent();
}
- return !worklist.empty();
+ if (!worklist.empty()) {
+ RemoveDeadDbgIntrinsics(F);
+ return true;
+ }
+
+ return false;
}
FunctionPass *llvm::createAggressiveDCEPass() {