The main observation is that we never need both the filesize and the map size.
When mapping a slice of a file, it doesn't make sense to request a null
terminator and that would be the only case where the filesize would be used.
There are other cleanups that should be done in this area:
* A client should not have to pass the size (even an explicit -1) to say if
it wants a null terminator or not, so we should probably swap the argument
order.
* The default should be to not require a null terminator. Very few clients
require this, but many end up asking for it just because it is the default.
llvm-svn: 186984
The gold plugin was passing the desired map size as the file size. This was
working for two reasons:
* Recent version of gold provide the get_view callback, so this code was not
used.
* In older versions, getOpenFile was called, but the file size is never used
if we don't require null terminated buffers and map size defaults to the
file size.
Thanks to Eli Bendersky for noticing this.
I will try to make this api a bit less error prone.
llvm-svn: 186978
This change removes the final instances of compile-time #ifdef magic
from the elf core plugin. Also rename the classes to ELFLinux... as
they're specific to Linux.
llvm-svn: 186977
Extracting thread data at parse time simplifies multi-platform support.
This change adds FreeBSD thread names and auxv info.
Thanks to Samuel Jacob for review, testing, and improvements.
llvm-svn: 186975
ELF notes contain a 'name' field, which specifies a vendor who defines
the format of the note. Examples are 'FreeBSD' or 'GNU', or it may be
empty for generic notes.
Add a case for FreeBSD-specific notes, leaving Linux and GNU notes,
other vendor-specific notes, and generic notes to be handled by the
existing code for now.
Thanks to Samuel Jacob for reviewing and suggesting improvements.
llvm-svn: 186973
function-like macro. Clang will attempt to correct the arguments by detecting
braced initializer lists:
1) If possible, suggest parentheses around arguments
containing braced lists which will give the proper number of arguments.
2) If a braced list is detected at the start of a macro argument, it cannot be
corrected by parentheses. Instead, just point out the location of these
braced lists.
llvm-svn: 186971
-C usually specifies a script to prepopulate the CMake cache. In this case no
script is specified, so CMake appears to just ignore it. So don't mention it
in the first place - it's not desired anyways.
Reviewed by: Daniel Malea
llvm-svn: 186964
It seems that doxygen fails to find overloaded methods when the parameters are
not in sync with the method declaration.
Added the fully-qualifed type to the parameters method definition although it's
not necessary since the using directive is in effect.
llvm-svn: 186948
This is still a fairly odd test. Clang wants to run gcc for assembling. At
least with -### it only prints that instead of actually trying to run it with
-ccc-echo.
llvm-svn: 186945
Adding a feature to optionally reformat code changed by the migrator. Like
LibFormat, can choose between built-in styles (LLVM, Mozilla, Google, Chromium)
or use a YAML-format config file.
Now with no dependency on iostream by the Reformatting.cpp LIT test.
Author: Guillaume Papin <guillaume.papin@epitech.eu>
llvm-svn: 186938
The symbol table has forward references in the file. Instead of allocating
a temporary buffer or counting the size and then writing, this implementation
writes a dummy value first and patches it once the final value is known.
There is room for performance improvement. I will implement them as soon as I
get some other features (like a ranlib mode) in.
llvm-svn: 186934