Don't verify module inclusions in assembler files.

llvm-svn: 203929
This commit is contained in:
Daniel Jasper 2014-03-14 14:53:17 +00:00
parent 011ffb47cf
commit 5c77e39f2d
5 changed files with 11 additions and 2 deletions

View File

@ -600,7 +600,7 @@ const FileEntry *Preprocessor::LookupFile(
Filename, FilenameLoc, isAngled, FromDir, CurDir, Includers, SearchPath,
RelativePath, SuggestedModule, SkipCache);
if (FE) {
if (SuggestedModule)
if (SuggestedModule && !LangOpts.AsmPreprocessor)
HeaderInfo.getModuleMap().diagnoseHeaderInclusion(
getModuleForLocation(FilenameLoc), FilenameLoc, Filename, FE);
return FE;

View File

@ -42,6 +42,10 @@ module XG {
module XH {
header "h.h"
header "h1.h"
header "s.h"
use XC
use XE
}
module XS {
}

View File

@ -0,0 +1,5 @@
// RUN: rm -rf %t
// RUN: %clang -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XS -I %S/Inputs/declare-use -c %s -Xclang -verify
// expected-no-diagnostics
#include "s.h"

View File

@ -44,7 +44,7 @@ else:
config.test_format = lit.formats.ShTest(execute_external)
# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s']
config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s', '.S']
# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
# subdirectories contain auxiliary inputs for various tests in their parent