diff options
| author | Paul Robinson <paul.robinson@sony.com> | 2017-12-14 18:46:43 +0000 |
|---|---|---|
| committer | Paul Robinson <paul.robinson@sony.com> | 2017-12-14 18:46:43 +0000 |
| commit | a1cedd6c46705aac4d78e827c6ca6a365fbafa32 (patch) | |
| tree | beec847e4f92a549d851c98cf2f2b3bcc7c3cb22 /llvm/lib | |
| parent | 5b0d5b45a241a9563d1075fa8e66be941b96443b (diff) | |
| download | bcm5719-llvm-a1cedd6c46705aac4d78e827c6ca6a365fbafa32.tar.gz bcm5719-llvm-a1cedd6c46705aac4d78e827c6ca6a365fbafa32.zip | |
[MC] Allow .file directives to be out-of-order
llvm-svn: 320727
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index bda0ec14599..9e5d9ff73c7 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -435,7 +435,8 @@ unsigned MCDwarfLineTableHeader::getFile(StringRef &Directory, return IterBool.first->second; } // Make space for this FileNumber in the MCDwarfFiles vector if needed. - MCDwarfFiles.resize(FileNumber + 1); + if (FileNumber >= MCDwarfFiles.size()) + MCDwarfFiles.resize(FileNumber + 1); // Get the new MCDwarfFile slot for this FileNumber. MCDwarfFile &File = MCDwarfFiles[FileNumber]; |

