On Thu, Aug 25, 2016 at 9:52 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > On 25 Aug 2016 7:37 p.m., "Bruno Cardoso Lopes" <bruno.card...@gmail.com> > wrote: > > bruno created this revision. > bruno added a reviewer: rsmith. > bruno added subscribers: cfe-commits, eladcohen. > > This adds support for modules that require (no-)gnu-inline-asm > environment, such as the compiler builtin cpuid submodule. > > This is the gnu-inline-asm variant of https://reviews.llvm.org/D23871 > > https://reviews.llvm.org/D23905 > > Files: > docs/Modules.rst > lib/Basic/Module.cpp > lib/Headers/module.modulemap > > test/Modules/Inputs/GNUAsm/NeedsGNUAsmInline.framework/Headers/NeedsGNUAsmInline.h > test/Modules/Inputs/GNUAsm/NeedsGNUAsmInline.framework/Headers/asm.h > test/Modules/Inputs/GNUAsm/NeedsGNUAsmInline.framework/module.map > test/Modules/requires-gnuasminline.m > > Index: test/Modules/requires-gnuasminline.m > =================================================================== > --- /dev/null > +++ test/Modules/requires-gnuasminline.m > @@ -0,0 +1,6 @@ > +// RUN: rm -rf %t > +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules \ > +// RUN: -fimplicit-module-maps -F %S/Inputs/GNUAsm %s \ > +// RUN: -fno-gnu-inline-asm -verify > + > +@import NeedsGNUAsmInline.Asm; // expected-error{{module > 'NeedsGNUAsmInline.Asm' requires feature 'gnuasminline'}} > > > You should add a positive test for the case where inline asm is available, > too... > > Index: test/Modules/Inputs/GNUAsm/NeedsGNUAsmInline.framework/module.map > =================================================================== > --- /dev/null > +++ test/Modules/Inputs/GNUAsm/NeedsGNUAsmInline.framework/module.map > @@ -0,0 +1,8 @@ > +framework module NeedsGNUAsmInline { > + header "NeedsGNUAsmInline.h" > + > + explicit module Asm { > + requires gnuasminline > > > ... that way, you'd catch this typo in the test :)
Oops :-) Will do, thanks! -- Bruno Cardoso Lopes http://www.brunocardoso.cc _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits