We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c904b00 commit d00421dCopy full SHA for d00421d
1 file changed
llvm/tools/pattern-gen/Main.cpp
@@ -128,15 +128,6 @@ int main(int argc, char **argv) {
128
auto Mod = std::make_unique<Module>("mod", Ctx);
129
auto Instrs = ParseCoreDSL2(Ts, (XLen == 64), Mod.get(), NoExtend);
130
131
- if (irOut) {
132
- std::string Str;
133
- raw_string_ostream OS(Str);
134
- OS << *Mod;
135
- OS.flush();
136
- irOut << Str << "\n";
137
- irOut.close();
138
- }
139
-
140
if (!SkipVerify)
141
if (verifyModule(*Mod, &errs()))
142
return -1;
@@ -168,6 +159,10 @@ int main(int argc, char **argv) {
168
159
.Is64Bit = (XLen == 64)};
169
160
170
161
optimizeBehavior(Mod.get(), Instrs, irOut, Args);
162
+
163
+ if (irOut)
164
+ irOut.close();
165
171
166
if (PrintIR)
172
167
llvm::outs() << *Mod << "\n";
173
if (!SkipFmt)
0 commit comments