Fix ASTReader handling of ImportDecls, from Meador Inge!

llvm-svn: 156923
This commit is contained in:
Douglas Gregor 2012-05-16 16:31:58 +00:00
parent 0a9f4e0b72
commit c48eafea50
4 changed files with 14 additions and 1 deletions

View File

@ -1249,7 +1249,6 @@ void ASTDeclReader::VisitImportDecl(ImportDecl *D) {
SourceLocation *StoredLocs = reinterpret_cast<SourceLocation *>(D + 1);
for (unsigned I = 0, N = Record.back(); I != N; ++I)
StoredLocs[I] = ReadSourceLocation(Record, Idx);
++Idx;
}
void ASTDeclReader::VisitAccessSpecDecl(AccessSpecDecl *D) {

View File

@ -0,0 +1 @@
struct T {};

View File

@ -84,3 +84,6 @@ module MethodPoolA {
module MethodPoolB {
header "MethodPoolB.h"
}
module import_decl {
header "import-decl.h"
}

View File

@ -0,0 +1,10 @@
// RUN: rm -rf %t
// RUN: %clang -fmodule-cache-path %t -fmodules -x objective-c -I %S/Inputs -emit-ast -o %t.ast %s
// RUN: %clang -cc1 -ast-print -x ast - < %t.ast | FileCheck %s
@__experimental_modules_import import_decl;
// CHECK: struct T
int main() {
return 0;
}