| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
We were storing both the path and the file name, which was redundant
and easy to get confused up with.
llvm-svn: 242347
|
| |
|
|
|
|
| |
While at it, test that we can add to a thin archive.
llvm-svn: 242330
|
| |
|
|
| |
llvm-svn: 242269
|
| |
|
|
|
|
|
|
|
|
| |
For now the Archive owns the buffers of the thin archive members.
This makes for a simple API, but all the buffers are destructed
only when the archive is destructed. This should be fine since we
close the files after mmap so we should not hit an open file
limit.
llvm-svn: 242215
|
| |
|
|
|
|
| |
This matches the gnu ar behavior.
llvm-svn: 242162
|
| |
|
|
| |
llvm-svn: 242156
|
| |
|
|
| |
llvm-svn: 242153
|
| |
|
|
| |
llvm-svn: 242061
|
| |
|
|
|
|
|
|
|
| |
They should probably be created on anything that is not windows or linux, but I will
test on freebsd before changing that.
With this it is possible to bootstrap with llvm-ar instead of ar+ranlib on OS X.
llvm-svn: 241849
|
| |
|
|
|
|
| |
NFC, just less error prone.
llvm-svn: 241747
|
| |
|
|
|
|
|
|
| |
No support for the symbol table yet (but will hopefully add it today).
We always use the long filename format so that we can align the member,
which is an advantage of the BSD format.
llvm-svn: 241721
|
| |
|
|
| |
llvm-svn: 240234
|
| |
|
|
|
|
|
|
|
|
| |
llvm-lib is intended to be a lib.exe compatible utility that also
understands bitcode. The implementation lives in a library so that
lld can use it to implement /lib.
Differential Revision: http://reviews.llvm.org/D10297
llvm-svn: 239434
|
| |
|
|
|
|
|
|
|
| |
No functional change intended, other than some minor changes to certain
diagnostics.
Differential Revision: http://reviews.llvm.org/D10296
llvm-svn: 239278
|
| |
|
|
|
|
| |
NFC.
llvm-svn: 232976
|
| |
|
|
|
|
| |
This fixes PR22358.
llvm-svn: 227296
|
| |
|
|
|
|
| |
CMake-produced solutions that care about such things (like MSVC). This takes llvm-ranlib out of the root solution folder and places it into the Tools folder where it belongs.
llvm-svn: 225353
|
| |
|
|
|
|
|
| |
This cuts down the number on system calls done by a static llvm-ar producing
lib/libclangSema.a from 9164 to 442.
llvm-svn: 224025
|
| |
|
|
|
|
| |
We already have them mapped into memory, so we can just close the file.
llvm-svn: 224020
|
| |
|
|
|
|
|
| |
Introduce install_symlink.cmake from clang/tools/driver/clang_symlink.cmake.
FIXME: Would it be generalized?
llvm-svn: 223655
|
| |
|
|
|
|
| |
Object/archive-symtab.test requires llvm-ranlib.
llvm-svn: 223332
|
| |
|
|
|
|
| |
This should fix the windows build.
llvm-svn: 223324
|
| |
|
|
| |
llvm-svn: 223321
|
| |
|
|
| |
llvm-svn: 223309
|
| |
|
|
| |
llvm-svn: 221549
|
| |
|
|
| |
llvm-svn: 220389
|
| |
|
|
| |
llvm-svn: 220364
|
| |
|
|
| |
llvm-svn: 220346
|
| |
|
|
| |
llvm-svn: 220344
|
| |
|
|
|
|
|
| |
This matches the behavior of GNU ar and also makes it easier to implemnt
support for the addlib command.
llvm-svn: 220336
|
| |
|
|
|
|
|
|
|
| |
This is a micro optimization, but also makes the code a bit more flexible.
The MRIMembers variable is a short term hack. It is going away in the next
commit.
llvm-svn: 220334
|
| |
|
|
| |
llvm-svn: 220327
|
| |
|
|
| |
llvm-svn: 220317
|
| |
|
|
|
|
|
| |
Don't duplicate names in comments and remove useless ones. Hopefully anyone
reading this knows what main is.
llvm-svn: 220298
|
| |
|
|
| |
llvm-svn: 220294
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was quiet surprised to find this feature being used. Fortunately the uses
I found look fairly simple. In fact, they are just a very verbose version
of the regular ar commands.
Start implementing it then by parsing the script and setting the command
variables as if we had a regular command line.
This patch adds just enough support to create an empty archive and do a bit
of error checking. In followup patches I will implement at least addmod
and addlib.
From the description in the manual, even the more general case should not
be too hard to implement if needed. The features that don't map 1:1 to
the simple command line are
* Reading from multiple archives.
* Creating multiple archives.
llvm-svn: 219521
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries
(like Archive) and we had to create dummy buffers just to handle that. It is
also a bad fit for IRObjectFile where the Module wants to own the buffer too.
Keeping this ownership would make supporting IR inside native objects
particularly painful.
This patch focuses in lib/Object. If something elsewhere used to own an Binary,
now it also owns a MemoryBuffer.
This patch introduces a few new types.
* MemoryBufferRef. This is just a pair of StringRefs for the data and name.
This is to MemoryBuffer as StringRef is to std::string.
* OwningBinary. A combination of Binary and a MemoryBuffer. This is needed
for convenience functions that take a filename and return both the
buffer and the Binary using that buffer.
The C api now uses OwningBinary to avoid any change in semantics. I will start
a new thread to see if we want to change it and how.
llvm-svn: 216002
|
| |
|
|
|
|
|
|
|
| |
Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get
a reference to it.
Thanks to David Blaikie for the suggestion.
llvm-svn: 214516
|
| |
|
|
| |
llvm-svn: 214377
|
| |
|
|
| |
llvm-svn: 212920
|
| |
|
|
| |
llvm-svn: 212405
|
| |
|
|
|
|
|
| |
This should allow llvm-ar to be used instead of gnu ar + plugin in a LTO
build. I will add a release note about it once I finish a LTO bootstrap with it.
llvm-svn: 212287
|
| |
|
|
|
|
| |
Temporarily back out commits r211749, r211752 and r211754.
llvm-svn: 211814
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
string_ostream is a safe and efficient string builder that combines opaque
stack storage with a built-in ostream interface.
small_string_ostream<bytes> additionally permits an explicit stack storage size
other than the default 128 bytes to be provided. Beyond that, storage is
transferred to the heap.
This convenient class can be used in most places an
std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair
would previously have been used, in order to guarantee consistent access
without byte truncation.
The patch also converts much of LLVM to use the new facility. These changes
include several probable bug fixes for truncated output, a programming error
that's no longer possible with the new interface.
llvm-svn: 211749
|
| |
|
|
|
|
|
| |
Once the objects are constructed, they own the buffer. Passing a unique_ptr
makes that clear.
llvm-svn: 211595
|
| |
|
|
|
|
|
|
| |
This makes the buffer ownership on error conditions very natural. The buffer
is only moved out of the argument if an object is constructed that now
owns the buffer.
llvm-svn: 211546
|
| |
|
|
|
|
|
|
|
|
| |
This allows us to just use a std::unique_ptr to store the pointer to the buffer.
The flip side is that they have to support releasing the buffer back to the
caller.
Overall this looks like a more efficient and less brittle api.
llvm-svn: 211542
|
| |
|
|
| |
llvm-svn: 211538
|
| |
|
|
| |
llvm-svn: 211222
|
| |
|
|
|
|
| |
We can delete the objects earlier now that we are copying the names to a buffer.
llvm-svn: 211221
|