[llvm-commits] [llvm] r62686 - in /llvm/trunk: tools/llvmc/doc/LLVMC-Reference.rst utils/TableGen/LLVMCConfigurationEmitter.cpp
Mikhail Glushenkov
foldr at codedgers.com
Wed Jan 21 05:04:33 PST 2009
Author: foldr
Date: Wed Jan 21 07:04:33 2009
New Revision: 62686
URL: http://llvm.org/viewvc/llvm-project?rev=62686&view=rev
Log:
Change the hook API back to prevent memory leaks.
Modified:
llvm/trunk/tools/llvmc/doc/LLVMC-Reference.rst
llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
Modified: llvm/trunk/tools/llvmc/doc/LLVMC-Reference.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/doc/LLVMC-Reference.rst?rev=62686&r1=62685&r2=62686&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/doc/LLVMC-Reference.rst (original)
+++ llvm/trunk/tools/llvmc/doc/LLVMC-Reference.rst Wed Jan 21 07:04:33 2009
@@ -565,7 +565,7 @@
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::
Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=62686&r1=62685&r2=62686&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Wed Jan 21 07:04:33 2009
@@ -1866,7 +1866,7 @@
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 ? "" : ", ");
More information about the llvm-commits
mailing list