From 03855b657fd0296e8663f35d0770994fe3b3e255 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 15 Sep 2017 02:59:55 +0000 Subject: [PATCH] [Object] Fix missing arguments to getType and getSymbol in Elf_Rel_Impl Somehow this was compiling without these methods having their arguments passed to them. I used these methods in some code I wrote and it raised an error on me. It appears no one else has used these methods let (LLD uses setSymbolAndType however). This change resolves the issue. Patch by Jake Ehrlich Differential Revision: https://reviews.llvm.org/D35100 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313336 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/ELFTypes.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/Object/ELFTypes.h b/include/llvm/Object/ELFTypes.h index 808144694ac..83b688548fd 100644 --- a/include/llvm/Object/ELFTypes.h +++ b/include/llvm/Object/ELFTypes.h @@ -406,10 +406,10 @@ struct Elf_Rel_Impl, false> { return (unsigned char)(this->getRInfo(isMips64EL) & 0x0ff); } void setSymbol(uint32_t s, bool IsMips64EL) { - setSymbolAndType(s, getType(), IsMips64EL); + setSymbolAndType(s, getType(IsMips64EL), IsMips64EL); } void setType(unsigned char t, bool IsMips64EL) { - setSymbolAndType(getSymbol(), t, IsMips64EL); + setSymbolAndType(getSymbol(IsMips64EL), t, IsMips64EL); } void setSymbolAndType(uint32_t s, unsigned char t, bool IsMips64EL) { this->setRInfo((s << 8) + t, IsMips64EL); @@ -459,10 +459,10 @@ struct Elf_Rel_Impl, false> { return (uint32_t)(this->getRInfo(isMips64EL) & 0xffffffffL); } void setSymbol(uint32_t s, bool IsMips64EL) { - setSymbolAndType(s, getType(), IsMips64EL); + setSymbolAndType(s, getType(IsMips64EL), IsMips64EL); } void setType(uint32_t t, bool IsMips64EL) { - setSymbolAndType(getSymbol(), t, IsMips64EL); + setSymbolAndType(getSymbol(IsMips64EL), t, IsMips64EL); } void setSymbolAndType(uint32_t s, uint32_t t, bool IsMips64EL) { this->setRInfo(((uint64_t)s << 32) + (t & 0xffffffffL), IsMips64EL); -- 2.40.0