summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-09-15 20:50:40 +0000
committerDevang Patel <dpatel@apple.com>2010-09-15 20:50:40 +0000
commit28b5286bda20f9ec2fc5d818a4444fb06194f5f6 (patch)
treefb07b41a792f33c5b1e4e9a8e404a425be599ff5 /clang/lib/CodeGen/CGDebugInfo.cpp
parent40e85fbf1715355194adee5c2e0cd0071ef18aee (diff)
downloadbcm5719-llvm-28b5286bda20f9ec2fc5d818a4444fb06194f5f6.tar.gz
bcm5719-llvm-28b5286bda20f9ec2fc5d818a4444fb06194f5f6.zip
While handling change of file, check if _current_ file is already seen or not. If current file is seen then it indicates that end of previous file's lexical scope.
This fixes radar 8396182. llvm-svn: 114018
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 406db886eee..24542fd5b80 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1570,9 +1570,10 @@ void CGDebugInfo::UpdateLineDirectiveRegion(CGBuilderTy &Builder) {
&& "error handling #line regions!");
bool SeenThisFile = false;
+ // Chek if current file is already seen earlier.
for(std::vector<const char *>::iterator I = LineDirectiveFiles.begin(),
E = LineDirectiveFiles.end(); I != E; ++I)
- if (!strcmp(PPLoc.getFilename(), *I)) {
+ if (!strcmp(PCLoc.getFilename(), *I)) {
SeenThisFile = true;
break;
}
OpenPOWER on IntegriCloud