From fe9b4a6ac57cbdf2b7684ab11982dc03aeff458d Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Sat, 5 Dec 2015 11:58:40 +0100 Subject: [PATCH] move strcascmp on isa to _after_ comparing isa against NULL --- ispc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ispc.cpp b/ispc.cpp index 6e4292b5..224d8fbc 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -478,10 +478,6 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic, boo } } - if (!strcasecmp(isa, "host")) { - isa = lGetSystemISA(); - } - if (isa == NULL) { // If a CPU was specified explicitly, try to pick the best // possible ISA based on that. @@ -551,6 +547,10 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic, boo isa, cpu); } + if (!strcasecmp(isa, "host")) { + isa = lGetSystemISA(); + } + if (arch == NULL) { #ifdef ISPC_ARM_ENABLED if (!strncmp(isa, "neon", 4))