diff options
author | Devang Patel <dpatel@apple.com> | 2010-09-15 20:50:40 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-09-15 20:50:40 +0000 |
commit | 424a5c63bb337926f3a1bfa20cc9f7c944aacbb0 (patch) | |
tree | 9fc830140e3702eb90e3fc49b476b04ef878d3c7 /lib/CodeGen/CGDebugInfo.cpp | |
parent | f73c93fea0d4b447585bc7459499ba6b822e045c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 406db886ee..24542fd5b8 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/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; } |