Skip to content

Commit

Permalink
use std::string instead of StringRef to avoid C++ auto-finalizer on l…
Browse files Browse the repository at this point in the history
…lvm3.3 getHostCPUName() result
  • Loading branch information
vtjnash committed Jul 8, 2015
1 parent 918ee65 commit 896cadf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5643,8 +5643,8 @@ extern "C" void jl_init_codegen(void)
TheTriple.setEnvironment(Triple::ELF);
#endif
#endif
StringRef TheCPU = strcmp(jl_options.cpu_target,"native") ? StringRef(jl_options.cpu_target) : StringRef(sys::getHostCPUName());
if (TheCPU.empty() || TheCPU == StringRef("generic")) {
std::string TheCPU = strcmp(jl_options.cpu_target,"native") ? jl_options.cpu_target : sys::getHostCPUName();
if (TheCPU.empty() || TheCPU == "generic") {
jl_printf(JL_STDERR, "warning: unable to determine host cpu name.\n");
#ifdef _CPU_ARM_
MAttrs.append(1, "+vfp2"); // the processors that don't have VFP are old and (hopefully) rare. this affects the platform calling convention.
Expand Down

0 comments on commit 896cadf

Please sign in to comment.