compareVersions(main['GCC_VERSION'], '4.9') >= 0:
main.Append(CCFLAGS=['-fsanitize=address,undefined',
'-fno-omit-frame-pointer'],
- LINKFLAGS='-fsanitize=address,undefined')
+ LINKFLAGS='-fsanitize=address,undefined')
else:
main.Append(CCFLAGS=['-fsanitize=address',
'-fno-omit-frame-pointer'],
- LINKFLAGS='-fsanitize=address')
+ LINKFLAGS='-fsanitize=address')
# Only gcc >= 4.9 supports UBSan, so check both the version
# and the command-line option before adding the compiler and
# linker flags.
# versions here.
if GetOption('with_ubsan'):
if GetOption('with_asan'):
- env.Append(CCFLAGS=['-fsanitize=address,undefined',
- '-fno-omit-frame-pointer'],
+ main.Append(CCFLAGS=['-fsanitize=address,undefined',
+ '-fno-omit-frame-pointer'],
LINKFLAGS='-fsanitize=address,undefined')
else:
- env.Append(CCFLAGS='-fsanitize=undefined',
- LINKFLAGS='-fsanitize=undefined')
+ main.Append(CCFLAGS='-fsanitize=undefined',
+ LINKFLAGS='-fsanitize=undefined')
elif GetOption('with_asan'):
- env.Append(CCFLAGS=['-fsanitize=address',
- '-fno-omit-frame-pointer'],
+ main.Append(CCFLAGS=['-fsanitize=address',
+ '-fno-omit-frame-pointer'],
LINKFLAGS='-fsanitize=address')
else:
static constexpr size_t Scale = TheISA::NumVecElemPerVecReg;
friend struct std::hash<RegId>;
public:
- RegId() {};
+ RegId() : regClass(IntRegClass), regIdx(0), elemIdx(-1) {}
RegId(RegClass reg_class, RegIndex reg_idx)
: regClass(reg_class), regIdx(reg_idx), elemIdx(-1)
{