mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 12:26:07 +00:00

This preserves backwards compatibility for two hacks in the Darwin system module map files: 1. The use of 'requires excluded' to make headers non-modular, which should really be mapped to 'textual' now that we have this feature. 2. Silently removes a bogus cplusplus requirement from IOKit.avc. Once we start diagnosing missing requirements and headers on auto-imports these would have broken compatibility with existing Darwin SDKs. llvm-svn: 244912
23 lines
752 B
Objective-C
23 lines
752 B
Objective-C
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -isystem %S/Inputs/System/usr/include -triple x86_64-apple-darwin10 %s -verify -fsyntax-only
|
|
// expected-no-diagnostics
|
|
|
|
@import Darwin.C.excluded; // no error, header is implicitly 'textual'
|
|
@import Tcl.Private; // no error, header is implicitly 'textual'
|
|
@import IOKit.avc; // no error, cplusplus requirement removed
|
|
|
|
#if defined(DARWIN_C_EXCLUDED)
|
|
#error assert.h should be textual
|
|
#elif defined(TCL_PRIVATE)
|
|
#error tcl-private/header.h should be textual
|
|
#endif
|
|
|
|
#import <assert.h>
|
|
#import <tcl-private/header.h>
|
|
|
|
#if !defined(DARWIN_C_EXCLUDED)
|
|
#error assert.h missing
|
|
#elif !defined(TCL_PRIVATE)
|
|
#error tcl-private/header.h missing
|
|
#endif
|