diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-28 23:57:43 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-28 23:57:43 +0000 |
commit | 19645d2ae928580b62f9feff91c5aa5e19f5f20d (patch) | |
tree | 15b7fbbfc3bafa40a162602bc8e08d8ae51a5166 /lib/Serialization/ASTWriterDecl.cpp | |
parent | ee591a90c2e26c1ba33a4befb364a1c35fb2c311 (diff) |
[PCH] In ASTWriter::associateDeclWithFile don't bother finding the file loc
if we are not interested in the decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTWriterDecl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index 1b95e927f9..3e3e28dfbb 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -1662,10 +1662,8 @@ void ASTWriter::WriteDecl(ASTContext &Context, Decl *D) { } SourceManager &SM = Context.getSourceManager(); - if (Loc.isValid() && SM.isLocalSourceLocation(Loc)) { - SourceLocation FileLoc = SM.getFileLoc(Loc); - associateDeclWithFile(D, ID, FileLoc); - } + if (Loc.isValid() && SM.isLocalSourceLocation(Loc)) + associateDeclWithFile(D, ID); } // Build and emit a record for this declaration |