mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-23 08:13:13 +01:00
Avoid some unecessary heap allocations by using llvm's StringRef class.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user