]> granicus.if.org Git - clang/commitdiff
use simpler method
authorChris Lattner <sabre@nondot.org>
Sun, 25 Jan 2009 22:02:19 +0000 (22:02 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 25 Jan 2009 22:02:19 +0000 (22:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62974 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteBlocks.cpp

index 706eef8918200242dd51ad7124db147965bedd91..75aa3c863a1990a8eb694c3346a8847255edcf04 100644 (file)
@@ -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;
 }