1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[yaml2obj] Support numeric indexes to create invalid files. Will be used by lld test.

llvm-svn: 246233
This commit is contained in:
Michael J. Spencer 2015-08-27 23:11:20 +00:00
parent d9149d4cf3
commit 78bdd69848

View File

@ -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;