From 09ea9c9fd6d74b974e2fc3613a16a776e000303f Mon Sep 17 00:00:00 2001 From: Evghenii Date: Sat, 25 Jan 2014 18:06:12 +0100 Subject: [PATCH] added function name mangling for operators --- module.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module.cpp b/module.cpp index 8a3f3507..c41ca1da 100644 --- a/module.cpp +++ b/module.cpp @@ -2648,14 +2648,16 @@ Module::CompileAndOutput(const char *srcFile, I->setName(lCBEMangle(I->getName())); } -#if 0 /* mangles primitves as well grrr */ /* mangle functions names */ { llvm::Module::iterator I = m->module->begin(), E = m->module->end(); for (; I != E; I++) - I->setName(lCBEMangle(I->getName())); + { + std::string str = I->getName(); + if (str.find("operator") != std::string::npos) + I->setName(lCBEMangle(str)); + } } -#endif } if (outputType == CXX) {