File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 32
32
#include " llvm/IR/GlobalIFunc.h"
33
33
#include " llvm/IR/GlobalObject.h"
34
34
#include " llvm/IR/InlineAsm.h"
35
+ #include " llvm/IR/InstIterator.h"
35
36
#include " llvm/IR/Instructions.h"
36
37
#include " llvm/IR/IntrinsicInst.h"
37
38
#include " llvm/IR/Intrinsics.h"
@@ -158,13 +159,11 @@ void LLParser::dropUnknownMetadataReferences() {
158
159
auto Pred = [](unsigned MDKind, MDNode *Node) { return Node->isTemporary (); };
159
160
for (Function &F : *M) {
160
161
F.eraseMetadataIf (Pred);
161
- for (BasicBlock &BB : F) {
162
- for (Instruction &I : make_early_inc_range (BB)) {
163
- I.eraseMetadataIf (Pred);
162
+ for (Instruction &I : make_early_inc_range (instructions (F))) {
163
+ I.eraseMetadataIf (Pred);
164
164
165
- if (auto *II = dyn_cast<IntrinsicInst>(&I))
166
- dropIntrinsicWithUnknownMetadataArgument (II);
167
- }
165
+ if (auto *II = dyn_cast<IntrinsicInst>(&I))
166
+ dropIntrinsicWithUnknownMetadataArgument (II);
168
167
}
169
168
}
170
169
You can’t perform that action at this time.
0 commit comments