Avoid some unecessary heap allocations by using llvm's StringRef class.

This commit is contained in:
Benjamin Kramer
2009-08-14 01:43:30 +02:00
parent c220dcac05
commit d24643bb50
4 changed files with 73 additions and 74 deletions

View File

@@ -88,7 +88,7 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
assert(!global.errors);
// name the module
std::string mname(toChars());
llvm::StringRef mname(toChars());
if (md != 0)
mname = md->toChars();