Files
revng-revng/lib/Support/CTarget.cpp
Lauri Vasama 90658bbbed Change default C target size of long
Currently there is only a single default target used for all C emission.
However, the emitted code is actually compiled using multiple
implementations (32-bit and 64-bit targets), some of which use a 32-bit
wide long. This causes integer literals to be emitted with wrong sizes
on those targets. This change forces all 64-bit literals to be emitted
using long long, which is 64 bits wide in all relevant implementations.
2026-04-08 11:12:41 +03:00

18 lines
428 B
C++

//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "revng/Support/CTarget.h"
const TargetCImplementation TargetCImplementation::Default = {
.PointerSize = 8,
.IntegerTypes = {
{ 1, CIntegerKind::Char },
{ 2, CIntegerKind::Short },
{ 4, CIntegerKind::Int },
{ 4, CIntegerKind::Long },
{ 8, CIntegerKind::LongLong },
{ 16, CIntegerKind::Extended },
},
};