[IDE] Use ClangNode::getLocation().

Swift SVN r16253
This commit is contained in:
Argyrios Kyrtzidis
2014-04-12 16:33:39 +00:00
parent 4c91bd074f
commit 49ef6ab8cd

View File

@@ -195,12 +195,7 @@ void swift::ide::printSubmoduleInterface(
continue;
}
if (auto CN = D->getClangNode()) {
clang::SourceLocation Loc;
if (auto *CD = CN.getAsDecl()) {
Loc = CD->getLocation();
} else {
Loc = CN.getAsMacro()->getDefinitionLoc();
}
clang::SourceLocation Loc = CN.getLocation();
auto *OwningModule = Importer.getClangOwningModule(CN);
auto I = ClangDecls.find(OwningModule);