We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8c7d2b commit b6f9270Copy full SHA for b6f9270
lib/SIL/OptimizationRemark.cpp
@@ -77,6 +77,8 @@ Emitter::Emitter(StringRef PassName, SILModule &M)
77
template <typename RemarkT, typename... ArgTypes>
78
static void emitRemark(SILModule &Module, const Remark<RemarkT> &R,
79
Diag<ArgTypes...> ID, bool DiagEnabled) {
80
+ if (R.getLocation().isInvalid())
81
+ return;
82
if (auto *Out = Module.getOptRecordStream())
83
// YAMLTraits takes a non-const reference even when outputting.
84
*Out << const_cast<Remark<RemarkT> &>(R);
0 commit comments