mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 11:36:06 +00:00

We have a new policy in place making links to private resources something we try to avoid in source and test files. Normally, we'd organically switch to the new policy rather than make a sweeping change across a project. However, Clang is in a somewhat special circumstance currently: recently, I've had several new contributors run into rdar links around test code which their patch was changing the behavior of. This turns out to be a surprisingly bad experience, especially for newer folks, for a handful of reasons: not understanding what the link is and feeling intimidated by it, wondering whether their changes are actually breaking something important to a downstream in some way, having to hunt down strangers not involved with the patch to impose on them for help, accidental pressure from asking for potentially private IP to be made public, etc. Because folks run into these links entirely by chance (through fixing bugs or working on new features), there's not really a set of problematic links to focus on -- all of the links have basically the same potential for causing these problems. As a result, this is an omnibus patch to remove all such links. This was not a mechanical change; it was done by manually searching for rdar, radar, radr, and other variants to find all the various problematic links. From there, I tried to retain or reword the surrounding comments so that we would lose as little context as possible. However, because most links were just a plain link with no supporting context, the majority of the changes are simple removals. Differential Review: https://reviews.llvm.org/D158071
30 lines
875 B
C
30 lines
875 B
C
// REQUIRES: x86-registered-target
|
|
// RUN: %clang_cc1 -std=c89 -triple i386-apple-darwin10 -fblocks -debug-info-kind=limited -S %s -o -
|
|
|
|
typedef struct dispatch_queue_s *dispatch_queue_t;
|
|
__attribute__((visibility("default")))
|
|
extern struct dispatch_queue_s _dispatch_main_q;
|
|
typedef struct dispatch_item_s *dispatch_item_t;
|
|
typedef void (^dispatch_legacy_block_t)(dispatch_item_t);
|
|
dispatch_item_t LEGACY_dispatch_call(dispatch_queue_t dq,
|
|
dispatch_legacy_block_t dispatch_block,
|
|
dispatch_legacy_block_t callback_block) {
|
|
dispatch_queue_t lq = _dispatch_queue_get_current() ?: (&_dispatch_main_q);
|
|
dispatch_async(dq, ^{
|
|
if (callback_block) {
|
|
dispatch_async(lq, ^{
|
|
}
|
|
);
|
|
}
|
|
}
|
|
);
|
|
}
|
|
|
|
typedef struct P {
|
|
int x;
|
|
} PS;
|
|
# 1 ""
|
|
void foo(void) {
|
|
PS p2;
|
|
}
|