mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
Don't return error_code from a function that doesn't fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -214,9 +214,7 @@ uint64_t LLVMGetRelocationType(LLVMRelocationIteratorRef RI) {
|
||||
// NOTE: Caller takes ownership of returned string.
|
||||
const char *LLVMGetRelocationTypeName(LLVMRelocationIteratorRef RI) {
|
||||
SmallVector<char, 0> ret;
|
||||
if (std::error_code ec = (*unwrap(RI))->getTypeName(ret))
|
||||
report_fatal_error(ec.message());
|
||||
|
||||
(*unwrap(RI))->getTypeName(ret);
|
||||
char *str = static_cast<char*>(malloc(ret.size()));
|
||||
std::copy(ret.begin(), ret.end(), str);
|
||||
return str;
|
||||
|
Reference in New Issue
Block a user