arm: Refine error message
diff --git a/include/mcld/LD/DiagRelocations.inc b/include/mcld/LD/DiagRelocations.inc
index 91e0787..0035523 100644
--- a/include/mcld/LD/DiagRelocations.inc
+++ b/include/mcld/LD/DiagRelocations.inc
@@ -16,9 +16,9 @@
"%1:%2: undefined reference to `%0'")
DIAG(non_pic_relocation,
DiagnosticEngine::Error,
- "attempt to generate unsupported relocation type `%0' for symbol `%1', "
+ "attempt to generate unsupported relocation `%0' for symbol `%1', "
"recompile with -fPIC",
- "attempt to generate unsupported relocation type `%0' for symbol `%1, "
+ "attempt to generate unsupported relocation `%0' for symbol `%1, "
"recompile with -fPIC")
DIAG(base_relocation,
DiagnosticEngine::Fatal,
diff --git a/lib/Target/ARM/ARMRelocator.cpp b/lib/Target/ARM/ARMRelocator.cpp
index fefa08f..c23f4d3 100644
--- a/lib/Target/ARM/ARMRelocator.cpp
+++ b/lib/Target/ARM/ARMRelocator.cpp
@@ -399,7 +399,7 @@
break;
default:
- error(diag::non_pic_relocation) << static_cast<int>(pReloc.type())
+ error(diag::non_pic_relocation) << getName(pReloc.type())
<< pReloc.symInfo()->name();
break;
}
@@ -462,7 +462,7 @@
case llvm::ELF::R_ARM_THM_MOVT_ABS: {
// PIC code should not contain these kinds of relocation
if (config().isCodeIndep()) {
- error(diag::non_pic_relocation) << static_cast<int>(pReloc.type())
+ error(diag::non_pic_relocation) << getName(pReloc.type())
<< pReloc.symInfo()->name();
}
return;