diff --git a/Driver/RewriteBlocks.cpp b/Driver/RewriteBlocks.cpp index 706eef8918..75aa3c863a 100644 --- a/Driver/RewriteBlocks.cpp +++ b/Driver/RewriteBlocks.cpp @@ -354,7 +354,7 @@ void RewriteBlocks::HandleTopLevelDecl(Decl *D) { RewriteProtocolDecl(PD); // If we have a decl in the main file, see if we should rewrite it. - if (SM->getDecomposedFileLoc(Loc).first == MainFileID) + if (SM->isFromMainFile(Loc)) HandleDeclInMainFile(D); return; }