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.
2 parents c8c7d2b + b6f9270 commit 60d8bd6Copy full SHA for 60d8bd6
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