aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Driver/RewriteBlocks.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}