mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-16 10:56:21 +00:00

Whenever we are compiling implementation of a framework (with the `-fmodule-name=FW` option), we never translate `#import <FW/Header.h>` to an import, regardless of whether "Header.h" belongs to "FW" or "FW_Private". For the same reasons, we also disallow `@import FW`. However, we still allow `@import FW_Private`. This patch disallows that a well, to be consistent with the rest of the rules. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D142167
14 lines
484 B
Mathematica
14 lines
484 B
Mathematica
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
|
|
//--- frameworks/FW.framework/Modules/module.modulemap
|
|
framework module FW {}
|
|
//--- frameworks/FW.framework/Modules/module.private.modulemap
|
|
framework module FW_Private {}
|
|
|
|
//--- tu.m
|
|
@import FW_Private; // expected-error{{@import of module 'FW_Private' in implementation of 'FW'; use #import}}
|
|
|
|
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -fimplicit-module-maps \
|
|
// RUN: -fmodule-name=FW -F %t/frameworks %t/tu.m -verify
|