Implement support for calling imported C functions from Swift.

There is no protection whatsoever if the Clang-to-Swift type
conversion produces something that Swift doesn't lower in an
ABI-compatible way. That will be dealt with later.


Swift SVN r3249
This commit is contained in:
Doug Gregor
2012-11-27 00:34:48 +00:00
parent d726b3646c
commit 83f2874ba1
14 changed files with 202 additions and 36 deletions

View File

@@ -73,7 +73,7 @@ static bool IRGenImportedModules(TranslationUnit *TU,
bool IsREPL = true) {
// IRGen the modules this module depends on.
for (auto ModPair : TU->getImportedModules()) {
if (isa<BuiltinModule>(ModPair.second))
if (isa<BuiltinModule>(ModPair.second) || isa<ClangModule>(ModPair.second))
continue;
TranslationUnit *SubTU = cast<TranslationUnit>(ModPair.second);