[ELF] Fix uninitalized value.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@191924 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][InputGraph] Change the Resolver to use inputGraph

Changes :-

a) Functionality in InputGraph to insert Input elements at any position
b) Functionality in the Resolver to use nextFile
c) Move the functionality of assigning file ordinals to InputGraph
d) Changes all inputs to MemoryBuffers
e) Remove LinkerInput, InputFiles, ReaderArchive

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192081 91177308-0d34-0410-b5e6-96231b3b80d8
[lld] Add FileArchive

Fix adding a missed file in the previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192082 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][inputgraph] Fix build failure on Darwin/Windows

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192083 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][Darwin] Fix unused field warning.

This field would eventually be used.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192084 91177308-0d34-0410-b5e6-96231b3b80d8
Rename lld:*_error::_ -> lld:*_error::ErrorCode.

Summary: Rename lld:*_error::_ -> lld:*_error::ErrorCode.

Reviewers: shankarke

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1851

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192138 91177308-0d34-0410-b5e6-96231b3b80d8
Supoort mach-o encoded in yaml.

This is the first step in how I plan to get mach-o object files support into 
lld. We need to be able to test the mach-o Reader and Write on systems without 
a mach-o tools. Therefore, we want to support a textual way (YAML) to represent 
mach-o files.

MachONormalizedFile.h defines an in-memory abstraction of the content of mach-o  
files. The in-memory data structures are always native endianess and always
use 64-bit sizes. That internal data structure can then be converted to or
from three different formats: 1) yaml (text) encoded mach-o, 2) binary mach-o
files, 3) lld Atoms.

This patch defines the internal model and uses YAML I/O to implement the 
conversion to and from the model to yaml. The next patch will implement
the conversion from normalized to binary mach-o.

This patch includes unit tests to validate the yaml conversion APIs.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192147 91177308-0d34-0410-b5e6-96231b3b80d8
Convert error code structs to scoped enums.

Summary:
The original code with enum "_" is intended to emulate scoped enums.
Now we have real scoped enums, so use it.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1852

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192148 91177308-0d34-0410-b5e6-96231b3b80d8
Add comments. Early return.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192149 91177308-0d34-0410-b5e6-96231b3b80d8
fix test case failing on bot

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192152 91177308-0d34-0410-b5e6-96231b3b80d8
fix all EXPECT_EQ(.address) tests

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192153 91177308-0d34-0410-b5e6-96231b3b80d8
fix typos

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192154 91177308-0d34-0410-b5e6-96231b3b80d8
Expand auto for readability.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192162 91177308-0d34-0410-b5e6-96231b3b80d8
Make bitmask an unsigned type.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192163 91177308-0d34-0410-b5e6-96231b3b80d8
Remove an unnecessary local variable.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192164 91177308-0d34-0410-b5e6-96231b3b80d8
Use size_t instead of uint64_t to represent the vector length.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192165 91177308-0d34-0410-b5e6-96231b3b80d8
Rename path() -> getPath().

Differential Revision: http://llvm-reviews.chandlerc.com/D1853

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192167 91177308-0d34-0410-b5e6-96231b3b80d8
Rename GnuLd's path() too.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192169 91177308-0d34-0410-b5e6-96231b3b80d8
Move duplicate code in InputGraphs to the parent class.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192170 91177308-0d34-0410-b5e6-96231b3b80d8
[Cleanup] Remove file thats not being used

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192172 91177308-0d34-0410-b5e6-96231b3b80d8