diff --git a/src/CodeGen_Internal.cpp b/src/CodeGen_Internal.cpp index ebbd24997689..a6d5ed632e23 100644 --- a/src/CodeGen_Internal.cpp +++ b/src/CodeGen_Internal.cpp @@ -578,9 +578,11 @@ bool get_md_int(llvm::Metadata *value, int64_t &result) { bool get_md_bool(llvm::Metadata *value, bool &result) { int64_t r; if (!get_md_int(value, r)) { + result = false; return false; } - return r != 0; + result = r != 0; + return true; } bool get_md_string(llvm::Metadata *value, std::string &result) { if (!value) {