diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-03-06 02:14:28 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-03-06 02:14:28 +0000 |
| commit | ffb3778f87075a38eddfdf68f2b999b4eb0d24de (patch) | |
| tree | a3ab21175a351c0a446b49ac905005a66f7d9be4 /llvm/lib/System/Program.cpp | |
| parent | bb28bfdcbf037893133e2790053df9d685f84b88 (diff) | |
| download | bcm5719-llvm-ffb3778f87075a38eddfdf68f2b999b4eb0d24de.tar.gz bcm5719-llvm-ffb3778f87075a38eddfdf68f2b999b4eb0d24de.zip | |
This fixes PR531, a crash when running the CBE on a bytecode file.
The problem is that Function::renameLocalSymbols is iterating through
the symbol table planes, occasionally calling setName to rename a value
(which used to do a symbol table remove/insert pair).
The problem is that if there is only a single value in a particular type
plane that the remove will nuke the symbol table plane, and the insert
will create and insert a new one. This hoses Function::renameLocalSymbols
because it has an iterator to the old plane, under the (very reasonable)
assumption that simply renaming a value won't cause the type plane to
disappear.
This patch fixes the bug by making the rename operation a single atomic
operation, which has a side effect of making the whole thing faster too. :)
llvm-svn: 20469
Diffstat (limited to 'llvm/lib/System/Program.cpp')
0 files changed, 0 insertions, 0 deletions

