When we treat an #include or #import as a module import, create an
implicit ImportDecl in the translation unit to record the presence of
the import.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145727 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 2f167ee..1ed149b 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -2657,9 +2657,7 @@
Module *Imported,
SourceLocation EndLoc) {
void *Mem = C.Allocate(sizeof(ImportDecl) + sizeof(SourceLocation));
- ImportDecl *Import
- = new (Mem) ImportDecl(DC, ImportLoc, Imported,
- ArrayRef<SourceLocation>(&EndLoc, 1));
+ ImportDecl *Import = new (Mem) ImportDecl(DC, ImportLoc, Imported, EndLoc);
Import->setImplicit();
return Import;
}