Skip to content

Commit f6581cc

Browse files
* Addressing review comment (partially) - add a comment on the
`MeasurementsType` in QIR conversion pass. Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
1 parent 9219b26 commit f6581cc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Optimizer/CodeGen/ConvertToQIRAPI.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ struct QIRAPITypeConverter : public TypeConverter {
136136
addConversion(
137137
[&](quake::MeasureType ty) { return getResultType(ty.getContext()); });
138138
addConversion([&](quake::MeasurementsType ty) {
139+
// `MeasurementsType` should be eliminated before codegen.
140+
// This fallback uses an opaque pointer to avoid crashing if
141+
// the type leaks through unexpectedly.
139142
return LLVM::LLVMPointerType::get(ty.getContext());
140143
});
141144
addConversion([&](quake::StruqType ty) { return convertStruqType(ty); });

0 commit comments

Comments
 (0)