summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp')
-rw-r--r--contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp b/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp
index 705efe5..ee2a3ab 100644
--- a/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp
+++ b/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp
@@ -263,12 +263,12 @@ DWARFFormValue::dump(raw_ostream &OS, const DWARFCompileUnit *cu) const {
bool cu_relative_offset = false;
switch (Form) {
- case DW_FORM_addr: OS << format("0x%016x", uvalue); break;
+ case DW_FORM_addr: OS << format("0x%016" PRIx64, uvalue); break;
case DW_FORM_flag:
- case DW_FORM_data1: OS << format("0x%02x", uvalue); break;
- case DW_FORM_data2: OS << format("0x%04x", uvalue); break;
- case DW_FORM_data4: OS << format("0x%08x", uvalue); break;
- case DW_FORM_data8: OS << format("0x%016x", uvalue); break;
+ case DW_FORM_data1: OS << format("0x%02x", (uint8_t)uvalue); break;
+ case DW_FORM_data2: OS << format("0x%04x", (uint16_t)uvalue); break;
+ case DW_FORM_data4: OS << format("0x%08x", (uint32_t)uvalue); break;
+ case DW_FORM_data8: OS << format("0x%016" PRIx64, uvalue); break;
case DW_FORM_string:
OS << '"';
OS.write_escaped(getAsCString(NULL));
@@ -280,7 +280,7 @@ DWARFFormValue::dump(raw_ostream &OS, const DWARFCompileUnit *cu) const {
case DW_FORM_block4:
if (uvalue > 0) {
switch (Form) {
- case DW_FORM_block: OS << format("<0x%llx> ", uvalue); break;
+ case DW_FORM_block: OS << format("<0x%" PRIx64 "> ", uvalue); break;
case DW_FORM_block1: OS << format("<0x%2.2x> ", (uint8_t)uvalue); break;
case DW_FORM_block2: OS << format("<0x%4.4x> ", (uint16_t)uvalue); break;
case DW_FORM_block4: OS << format("<0x%8.8x> ", (uint32_t)uvalue); break;
@@ -314,7 +314,7 @@ DWARFFormValue::dump(raw_ostream &OS, const DWARFCompileUnit *cu) const {
break;
}
case DW_FORM_ref_addr:
- OS << format("0x%016x", uvalue);
+ OS << format("0x%016" PRIx64, uvalue);
break;
case DW_FORM_ref1:
cu_relative_offset = true;
@@ -330,11 +330,11 @@ DWARFFormValue::dump(raw_ostream &OS, const DWARFCompileUnit *cu) const {
break;
case DW_FORM_ref8:
cu_relative_offset = true;
- OS << format("cu + 0x%8.8llx", uvalue);
+ OS << format("cu + 0x%8.8" PRIx64, uvalue);
break;
case DW_FORM_ref_udata:
cu_relative_offset = true;
- OS << format("cu + 0x%llx", uvalue);
+ OS << format("cu + 0x%" PRIx64, uvalue);
break;
// All DW_FORM_indirect attributes should be resolved prior to calling
@@ -348,7 +348,7 @@ DWARFFormValue::dump(raw_ostream &OS, const DWARFCompileUnit *cu) const {
}
if (cu_relative_offset)
- OS << format(" => {0x%8.8x}", (uvalue + (cu ? cu->getOffset() : 0)));
+ OS << format(" => {0x%8.8" PRIx64 "}", uvalue + (cu ? cu->getOffset() : 0));
}
const char*
OpenPOWER on IntegriCloud