Apply suggestions
Signed-off-by: Pawel Kojma <pkojma@internships.antmicro.com>
This commit is contained in:
parent
02e0332d12
commit
b92ec9f3d7
|
|
@ -24,7 +24,6 @@
|
||||||
#ifndef VERILATOR_VERILATED_TYPES_H_
|
#ifndef VERILATOR_VERILATED_TYPES_H_
|
||||||
#define VERILATOR_VERILATED_TYPES_H_
|
#define VERILATOR_VERILATED_TYPES_H_
|
||||||
|
|
||||||
#include "verilatedos.h"
|
|
||||||
#ifndef VERILATOR_VERILATED_H_INTERNAL_
|
#ifndef VERILATOR_VERILATED_H_INTERNAL_
|
||||||
#error "verilated_types.h should only be included by verilated.h"
|
#error "verilated_types.h should only be included by verilated.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2071,15 +2070,24 @@ struct VlNull final {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
template <class T>
|
template <class T>
|
||||||
VL_CONSTEXPR_CXX17 bool operator==(T* ptr) const {
|
bool operator==(T* rhs) const {
|
||||||
return !ptr;
|
return !rhs;
|
||||||
}
|
}
|
||||||
template <class T>
|
template <class T>
|
||||||
VL_CONSTEXPR_CXX17 bool operator==(const T* ptr) const {
|
bool operator==(const T* rhs) const {
|
||||||
return !ptr;
|
return !rhs;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
inline bool operator==(T* lhs, VlNull) {
|
||||||
|
return !lhs;
|
||||||
|
}
|
||||||
|
template <class T>
|
||||||
|
inline bool operator==(const T* lhs, VlNull) {
|
||||||
|
return !lhs;
|
||||||
|
}
|
||||||
|
|
||||||
//===================================================================
|
//===================================================================
|
||||||
// Verilog class reference container
|
// Verilog class reference container
|
||||||
// There are no multithreaded locks on this; the base variable must
|
// There are no multithreaded locks on this; the base variable must
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of either the GNU Lesser General Public License Version 3
|
# under the terms of either the GNU Lesser General Public License Version 3
|
||||||
# or the Perl Artistic License Version 2.0.
|
# or the Perl Artistic License Version 2.0.
|
||||||
# SPDX-FileCopyrightText: 2024 Wilson Snyder
|
# SPDX-FileCopyrightText: 2026 Wilson Snyder
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
import vltest_bootstrap
|
import vltest_bootstrap
|
||||||
|
|
||||||
test.scenarios('vlt')
|
test.scenarios('vlt')
|
||||||
|
|
||||||
test.compile(verilator_flags2=['--binary', '--timing', '--compiler', 'clang', '-Wno-fatal'])
|
test.compile(verilator_flags2=['--binary', '-Wno-WIDTHTRUNC'])
|
||||||
|
|
||||||
test.passes()
|
test.passes()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue