Files
swift-mirror/stdlib/public/Concurrency/Debug.h
Mike Ash 329af74b15 [Concurrency] Add a debug variable pointing to the metadata for AsyncTask.
Debugging tools can use _swift_concurrency_debug_asyncTaskMetadata to identify memory blocks as async task allocations by looking at their isa/metadata pointer.

rdar://72906895
2021-01-27 13:45:22 -05:00

31 lines
938 B
C++

//===--- Debug.h - Swift Concurrency debug helpers --------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// Debugging and inspection support.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_CONCURRENCY_DEBUG_H
#define SWIFT_CONCURRENCY_DEBUG_H
#include "swift/Runtime/Config.h"
namespace swift {
/// The metadata pointer used for async task objects.
SWIFT_RUNTIME_STDLIB_SPI
const void *const _swift_concurrency_debug_asyncTaskMetadata;
} // namespace swift
#endif