mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Change the hook API back to prevent memory leaks.
llvm-svn: 62686
This commit is contained in:
parent
9153777db7
commit
bf9e875d8e
@ -565,7 +565,7 @@ or names in the configuration file. This can be easily achieved via
|
||||
the hooks mechanism. To write your own hooks, just add their
|
||||
definitions to the ``PluginMain.cpp`` or drop a ``.cpp`` file into the
|
||||
your plugin directory. Hooks should live in the ``hooks`` namespace
|
||||
and have the signature ``const char* hooks::MyHookName ([const char*
|
||||
and have the signature ``std::string hooks::MyHookName ([const char*
|
||||
Arg0 [ const char* Arg2 [, ...]]])``. They can be used from the
|
||||
``cmd_line`` tool property::
|
||||
|
||||
|
@ -1866,7 +1866,7 @@ void EmitHookDeclarations(const ToolDescriptions& ToolDescs, std::ostream& O) {
|
||||
O << "namespace hooks {\n";
|
||||
for (StringMap<unsigned>::const_iterator B = HookNames.begin(),
|
||||
E = HookNames.end(); B != E; ++B) {
|
||||
O << Indent1 << "const char* " << B->first() << "(";
|
||||
O << Indent1 << "std::string " << B->first() << "(";
|
||||
|
||||
for (unsigned i = 0, j = B->second; i < j; ++i) {
|
||||
O << "const char* Arg" << i << (i+1 == j ? "" : ", ");
|
||||
|
Loading…
Reference in New Issue
Block a user