diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-10-06 20:09:34 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-10-06 20:09:34 +0000 |
commit | 469350810aedd0317d6d022e473b8b5a24c2cdb3 (patch) | |
tree | c68176cd9a0c0c8f97c1afdae2ddfc3cd660ed5c /llvm/tools/llvm-rc/ResourceScriptParser.cpp | |
parent | e41f9e065159097a97e1b551e8d27f4a8f0161a8 (diff) | |
download | llvm-469350810aedd0317d6d022e473b8b5a24c2cdb3.zip llvm-469350810aedd0317d6d022e473b8b5a24c2cdb3.tar.gz llvm-469350810aedd0317d6d022e473b8b5a24c2cdb3.tar.bz2 |
Refine our --wrap implementation.
Before this patch we would copy foo into real_foo and wrap_foo into
foo. The net result is that __wrap_foo shows up twice in the symbol
table.
With this patch we:
* save a copy of __real_foo before copying foo.
* drop one of the __wrap_foo from the symbol table.
* if __real_foo was not undefined, add a *new* symbol with that content to
the symbol table.
The net result is that
Anything using foo now uses __wrap_foo
Anything using __real_foo now uses foo.
Anything using __wrap_foo still does.
And the symbol table has foo, __wrap_foo and __real_foo (if defined).
Which I think is the desired behavior.
llvm-svn: 315097
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptParser.cpp')
0 files changed, 0 insertions, 0 deletions