Skip to content

Commit 2b9e481

Browse files
committed
[IRGen] NFC: Add operator<< for MetadataResponse
Newer versions of clang are more reliable about emitting "used" functions, but that means that newer versions of clang can break the build if the dependencies of a "used" function aren't satisfied.
1 parent c326016 commit 2b9e481

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/IRGen/MetadataRequest.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,18 @@ class MetadataResponse {
372372
static llvm::Constant *getCompletedState(IRGenModule &IGM);
373373
};
374374

375+
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
376+
const MetadataResponse &MR) {
377+
if (!MR.isValid())
378+
return OS;
379+
OS << MR.getMetadata();
380+
if (MR.hasDynamicState())
381+
OS << MR.getDynamicState();
382+
// FIXME
383+
// OS << MR.getStaticLowerBoundOnState();
384+
return OS;
385+
}
386+
375387
inline bool
376388
DynamicMetadataRequest::isSatisfiedBy(MetadataResponse response) const {
377389
return isSatisfiedBy(response.getStaticLowerBoundOnState());

0 commit comments

Comments
 (0)