Skip to content

Commit

Permalink
Use a regular C++ string, prevents memory issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Mar 12, 2013
1 parent 6564ece commit ffec9d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vm/llvm/jit_builder.cpp
Expand Up @@ -51,8 +51,7 @@ namespace jit {
}

void Builder::set_definition_location() {
llvm::StringRef file_str(
ctx_->llvm_state()->symbol_debug_str(info_.method()->file()));
std::string file_str = ctx_->llvm_state()->symbol_debug_str(info_.method()->file());
debug_builder_.createCompileUnit(DW_LANG_Ruby, file_str,
"", "rubinius", true, "", 0);
DIFile file = debug_builder().createFile(file_str, "");
Expand Down

0 comments on commit ffec9d7

Please sign in to comment.