- Nov 29, 2014
-
-
Duncan P. N. Exon Smith authored
llvm-svn: 222945
-
- Nov 27, 2014
-
-
Lang Hames authored
Hopefully this will fix http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/8271/steps/stage1_build/logs/stdio llvm-svn: 222866
-
Peter Collingbourne authored
llvm-svn: 222860
-
- Nov 26, 2014
-
-
Rui Ueyama authored
llvm-objdump printed out an error message for this off-by-one error, but because it always exits with 0 whether or not it found an error, the test (llvm-objdump/coff-many-relocs.test) succeeded. I made llvm-objdump exit with EXIT_FAILURE when an error is found. llvm-svn: 222852
-
Lang Hames authored
llvm-svn: 222840
-
Aaron Ballman authored
http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/11753 llvm-svn: 222833
-
Lang Hames authored
Previously, when loading an object file, RuntimeDyld (1) took ownership of the ObjectFile instance (and associated MemoryBuffer), (2) potentially modified the object in-place, and (3) returned an ObjectImage that managed ownership of the now-modified object and provided some convenience methods. This scheme accreted over several years as features were tacked on to RuntimeDyld, and was both unintuitive and unsafe (See e.g. http://llvm.org/PR20722). This patch fixes the issue by removing all ownership and in-place modification of object files from RuntimeDyld. Existing behavior, including debugger registration, is preserved. Noteworthy changes include: (1) ObjectFile instances are now passed to RuntimeDyld by const-ref. (2) The ObjectImage and ObjectBuffer classes have been removed entirely, they existed to model ownership within RuntimeDyld, and so are no longer needed. (3) RuntimeDyld::loadObject now returns an instance of a new class, RuntimeDyld::LoadedObjectInfo, which can be used to construct a modified object suitable for registration with the debugger, following the existing debugger registration scheme. (4) The JITRegistrar class has been removed, and the GDBRegistrar class has been re-written as a JITEventListener. This should fix http://llvm.org/PR20722 . llvm-svn: 222810
-
- Nov 25, 2014
-
-
Rafael Espindola authored
llvm-svn: 222787
-
Charlie Turner authored
Fix ARMAttributeParser::CPU_arch_profile so that it doesn't switch on the value '0' as a legal value of this build attribute. Change-Id: Ie05a08900a82bb10b78c841b437df747ce3bb38e llvm-svn: 222743
-
- Nov 24, 2014
-
-
Rafael Espindola authored
This corresponds to the opt option and is handy for profiling. llvm-svn: 222687
-
- Nov 19, 2014
-
-
Duncan P. N. Exon Smith authored
Spotted while reading code. llvm-svn: 222395
-
Kevin Enderby authored
Fixes PR21607 llvm-svn: 222385
-
Colin LeMahieu authored
Appeasing mingw without C++11 std::to_string llvm-svn: 222369
-
David Blaikie authored
Having two ways to do this doesn't seem terribly helpful and consistently using the insert version (which we already has) seems like it'll make the code easier to understand to anyone working with standard data structures. (I also updated many references to the Entry's key and value to use first() and second instead of getKey{Data,Length,} and get/setValue - for similar consistency) Also removes the GetOrCreateValue functions so there's less surface area to StringMap to fix/improve/change/accommodate move semantics, etc. llvm-svn: 222319
-
David Blaikie authored
StringSet is still a bit dodgy in that it exposes the raw iterator of the StringMap parent, which exposes the weird detail that StringSet actually has a 'value'... but anyway, this is useful for a handful of clients that want to reference the newly inserted/persistent string data in the StringSet/Map/Entry/thing. llvm-svn: 222302
-
Rui Ueyama authored
It printed out base relocation table header as table entry. This patch also makes llvm-readobj to not skip ABSOLUTE entries becuase it was confusing. llvm-svn: 222299
-
Rui Ueyama authored
llvm-svn: 222289
-
- Nov 18, 2014
-
-
David Majnemer authored
We claimed that we were printing the Subystem field when we were actually printing the Characteristics field. llvm-svn: 222216
-
- Nov 17, 2014
-
-
David Majnemer authored
We were a little lax in a few areas: - We pretended that import libraries were like any old COFF file, they are not. In fact, they aren't really COFF files at all, we should probably grow some specialized functionality to handle them smarter. - Our symbol iterators were more than happy to attempt to go past the end of the symbol table if you had a symbol with a bad list of auxiliary symbols. llvm-svn: 222124
-
Frederic Riss authored
Patch by Chilledheart. Differential Revision: http://reviews.llvm.org/D6163 llvm-svn: 222115
-
- Nov 15, 2014
-
-
David Majnemer authored
While this program worked correctly with small example programs, larger ones tickled this bug. I'm working on a reduction because my program is quite large. llvm-svn: 222078
-
- Nov 14, 2014
-
-
Kevin Enderby authored
FYI, removed the unused MCInstrAnalysis as it does not exist for 64-bit ARM and was causing a “couldn't initialize disassembler for target” error. llvm-svn: 222045
-
David Majnemer authored
SizeOfHeaders must be aligned to the FileAlignment. SizeOfImage must be at least the SizeOfHeaders aligned to the SectionAlignment. llvm-svn: 222030
-
Frederic Riss authored
This reverts commit r221842 which was a revert of r221836 and of the test parts of r221837. This new version fixes an UB bug pointed out by David (along with addressing some other review comments), makes some dumping more resilient to broken input data and forces the accelerator tables to be dumped in the tests where we use them (this decision is platform specific otherwise). llvm-svn: 222003
-
David Majnemer authored
In support of serializing executables, obj2yaml now records the virtual address and size of sections. It also serializes whatever we strictly need from the PE header, it expects that it can reconstitute everything else via inference. yaml2obj can reconstitute a fully linked executable. In order to get executables correctly serialized/deserialized, other bugs were fixed as a circumstance. We now properly respect file and section alignments. We also avoid writing out string tables unless they are strictly necessary. llvm-svn: 221975
-
Justin Bogner authored
This teaches CoverageMapping::getCoveredFunctions to filter to a particular file and uses that to replace most of the logic found in llvm-cov report. llvm-svn: 221962
-
- Nov 13, 2014
-
-
David Majnemer authored
Don't assert if we can return an error code, reuse existing functionality like is64Bit(). llvm-svn: 221915
-
David Majnemer authored
On error conditions, relocAddressLess might claim that a value is less than itself. Instead, abort llvm-readobj. No functionality change intended. llvm-svn: 221872
-
David Majnemer authored
printRelocation doesn't use the section contents. No functionality change intended. llvm-svn: 221871
-
David Majnemer authored
lib/Object is supposed to be robust to malformed object files. Don't assert if we don't have a symbol table. I'll try to come up with a test case later. llvm-svn: 221870
-
Rui Ueyama authored
llvm-svn: 221855
-
Frederic Riss authored
This reverts commit r221836. The tests are asserting on some buildbots. This also reverts the test part of r221837 as it relies on dwarfdump dumping the accelerator tables. llvm-svn: 221842
-
Frederic Riss authored
The class used for the dump only allows to dump for the moment, but it can (and will) be easily extended to support search also. llvm-svn: 221836
-
- Nov 12, 2014
-
-
Timur Iskhodzhanov authored
[COFF] Make it clearer that the symbols subsection holds function display name rather than just name llvm-svn: 221812
-
Aaron Ballman authored
llvm-svn: 221782
-
Rafael Espindola authored
llvm-svn: 221755
-
Rafael Espindola authored
With this patch MCDisassembler::getInstruction takes an ArrayRef<uint8_t> instead of a MemoryObject. Even on X86 there is a maximum size an instruction can have. Given that, it seems way simpler and more efficient to just pass an ArrayRef to the disassembler instead of a MemoryObject and have it do a virtual call every time it wants some extra bytes. llvm-svn: 221751
-
Duncan P. N. Exon Smith authored
Add API for specifying which `LLVMContext` each `lto_module_t` and `lto_code_gen_t` is in. In particular, this enables the following flow: for (auto &File : Files) { lto_module_t M = lto_module_create_in_local_context(File...); querySymbols(M); lto_module_dispose(M); } lto_code_gen_t CG = lto_codegen_create_in_local_context(); for (auto &File : FilesToLink) { lto_module_t M = lto_module_create_in_codegen_context(File..., CG); lto_codegen_add_module(CG, M); lto_module_dispose(M); } lto_codegen_compile(CG); lto_codegen_write_merged_modules(CG, ...); lto_codegen_dispose(CG); This flow has a few benefits. - Only one module (two if you count the combined module in the code generator) is in memory at a time. - Metadata (and constants) from files that are parsed to query symbols but not linked into the code generator don't pollute the global context. - The first for loop can be parallelized, since each module is in its own context. - When the code generator is disposed, the memory from LTO gets freed. rdar://problem/18767512 llvm-svn: 221733
-
- Nov 11, 2014
-
-
Duncan P. N. Exon Smith authored
Instead, we're going to separate metadata from the Value hierarchy. See PR21532. This reverts commit r221375. This reverts commit r221373. This reverts commit r221359. This reverts commit r221167. This reverts commit r221027. This reverts commit r221024. This reverts commit r221023. This reverts commit r220995. This reverts commit r220994. llvm-svn: 221711
-
Colin LeMahieu authored
[llvm-mc] Fixing case where if a file ended with non-newline whitespace or a comma it would access invalid memory. Cleaned up parse loop. llvm-svn: 221707
-