diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/tools/yaml2obj/yaml2elf.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/tools/yaml2obj/yaml2elf.cpp b/llvm/tools/yaml2obj/yaml2elf.cpp index a247f48c053..849f202b126 100644 --- a/llvm/tools/yaml2obj/yaml2elf.cpp +++ b/llvm/tools/yaml2obj/yaml2elf.cpp @@ -222,9 +222,11 @@ bool ELFState<ELFT>::initSectionHeaders(std::vector<Elf_Shdr> &SHeaders, unsigned Index; if (SN2I.lookup(S->Info, Index)) { - errs() << "error: Unknown section referenced: '" << S->Info - << "' at YAML section '" << S->Name << "'.\n"; - return false; + if (S->Info.getAsInteger(0, Index)) { + errs() << "error: Unknown section referenced: '" << S->Info + << "' at YAML section '" << S->Name << "'.\n"; + return false; + } } SHeader.sh_info = Index; |