DebugInfo: PR14404: Avoid truncating 64 bit values into 32 bits for ULEB128/SLEB128 generation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2013-06-23 18:31:11 +00:00
parent 7130a95617
commit fe2e66a6da
5 changed files with 45 additions and 8 deletions

View File

@@ -98,7 +98,7 @@ MCAsmInfo::~MCAsmInfo() {
}
unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
unsigned MCAsmInfo::getULEB128Size(uint64_t Value) {
unsigned Size = 0;
do {
Value >>= 7;
@@ -107,7 +107,7 @@ unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
return Size;
}
unsigned MCAsmInfo::getSLEB128Size(int Value) {
unsigned MCAsmInfo::getSLEB128Size(int64_t Value) {
unsigned Size = 0;
int Sign = Value >> (8 * sizeof(Value) - 1);
bool IsMore;