summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-28 23:57:43 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-28 23:57:43 +0000
commitdf53da872501188319e3914d48eccdd1aa83ed11 (patch)
tree83e1ff27b2e4773b2a7391538ff6e2893983978b /clang/lib/Serialization/ASTWriterDecl.cpp
parent1848afbbe8b70f54d546e50ea46f84f70cff7e10 (diff)
downloadbcm5719-llvm-df53da872501188319e3914d48eccdd1aa83ed11.tar.gz
bcm5719-llvm-df53da872501188319e3914d48eccdd1aa83ed11.zip
[PCH] In ASTWriter::associateDeclWithFile don't bother finding the file loc
if we are not interested in the decl. llvm-svn: 143255
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterDecl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 1b95e927f9b..3e3e28dfbb7 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud