Michael J. Spencer
5cf93fd736
Support/FileSystem: Add file_magic and move a vew clients over to it.
...
llvm-svn: 146523
2011-12-13 23:17:12 +00:00
Dan Gohman
8626e387c3
Revert PathV2 changes, as sys::fs::unique_file is not finished yet.
...
llvm-svn: 126773
2011-03-01 19:50:55 +00:00
Michael J. Spencer
d076942763
Archive: Fix temp path names.
...
llvm-svn: 123660
2011-01-17 16:43:30 +00:00
Michael J. Spencer
861d5122e2
UnRevert "Revert "Archive: Replace all internal uses of PathV1 with PathV2. The external API still uses PathV1.""
...
llvm-svn: 123605
2011-01-16 23:39:59 +00:00
Michael J. Spencer
7663111de0
UnRevert "Revert the archive part of "Support/PathV2: Add identify_magic.""
...
This reverts commit dd103021a889a986a181ce36ed7b0e8dc9b645e1.
llvm-svn: 123595
2011-01-16 21:13:51 +00:00
Michael J. Spencer
29fdfe200e
Revert the archive part of "Support/PathV2: Add identify_magic."
...
llvm-svn: 123593
2011-01-16 19:56:42 +00:00
Michael J. Spencer
76f1706025
Revert "Archive: Replace all internal uses of PathV1 with PathV2. The external API still uses PathV1."
...
llvm-svn: 123557
2011-01-16 01:43:22 +00:00
Michael J. Spencer
303c304f0d
Archive: Replace all internal uses of PathV1 with PathV2. The external API still uses PathV1.
...
llvm-svn: 123551
2011-01-15 21:43:37 +00:00
Michael J. Spencer
e1defa51ae
Support/PathV2: Add identify_magic.
...
llvm-svn: 123548
2011-01-15 20:39:36 +00:00
Michael J. Spencer
bc362451c7
Fix Whitespace.
...
llvm-svn: 123152
2011-01-10 02:34:40 +00:00
Michael J. Spencer
917b043a16
Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists.
...
llvm-svn: 123151
2011-01-10 02:34:23 +00:00
Michael J. Spencer
86f6a9ac6e
MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
...
llvm-svn: 121958
2010-12-16 03:29:14 +00:00
Michael J. Spencer
15483143ec
Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
...
llvm-svn: 121379
2010-12-09 17:36:48 +00:00
Michael J. Spencer
d5ec932c3a
Merge System into Support.
...
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Dan Gohman
6163340daf
Eliminate some unnessary Path::exists() calls.
...
llvm-svn: 104888
2010-05-27 20:51:54 +00:00
Benjamin Kramer
96b4f6c003
Don't write into MemoryBuffers.
...
llvm-svn: 101783
2010-04-19 16:15:31 +00:00
Dan Gohman
4bdd10c6df
Fix a grammaro.
...
llvm-svn: 99917
2010-03-30 20:04:57 +00:00
Jeffrey Yasskin
fb10587e50
Kill ModuleProvider and ghost linkage by inverting the relationship between
...
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.
Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods. The bindings to
other languages still use the ModuleProvider concept. It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.
Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735 .
llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Chris Lattner
3203639c35
Prune #includes from llvm/Linker.h and llvm/System/Path.h,
...
forcing them down into various .cpp files.
This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
instead.
4. Weans llvm-db off <iostream>
sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.
llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Owen Anderson
4fa7e54329
Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
...
moment, that I will need to make far-reaching changes.
llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Owen Anderson
cf112e59c3
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Owen Anderson
81b8dabb53
Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
...
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.
Patches for Clang and LLVM-GCC to follow.
llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Duncan Sands
c12241a948
Avoid leaking memory in an error path. Noticed
...
by cppcheck.
llvm-svn: 73187
2009-06-11 08:09:49 +00:00
Devang Patel
a2ccbea45a
Silence unused variable warnings.
...
llvm-svn: 59841
2008-11-21 20:00:59 +00:00
Owen Anderson
72cb477348
Create archives with the same permissions are ar.
...
Patch by Mikael Lepistö.
llvm-svn: 51540
2008-05-24 05:42:29 +00:00
Dan Gohman
bab18cae46
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Chris Lattner
d141d16ed7
Change the MemoryBuffer::getFile* methods to take just a pointer to the
...
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Chris Lattner
5ba3ea7b4c
change the archive stuff to use MemoryBuffer instead of mappedfile.
...
MemoryBuffer is higher level and more closely matches the model
needed.
llvm-svn: 49029
2008-04-01 04:26:46 +00:00
Chris Lattner
f2309c208a
Remove MappedFile support for mapping files for write and exec
...
and shared. This complicates the design, is not used, and probably
doesn't even work.
llvm-svn: 49022
2008-04-01 03:10:22 +00:00
Chris Lattner
a4ddf7edfa
add missing #includes
...
llvm-svn: 49020
2008-04-01 02:58:05 +00:00
Andrew Lenharth
497a43290e
Make llvm-ar behave like ar, if you create an empty archive, ar creates an empty archive. llvm-ar would not generate an output file in this case
...
llvm-svn: 47733
2008-02-28 22:24:48 +00:00
Anton Korobeynikov
7dd00942cc
Update gcc 4.3 warnings fix patch with recent head changes
...
llvm-svn: 47368
2008-02-20 11:10:28 +00:00
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Gabor Greif
f5e225a756
eliminate residual cruft related to recognizing bytecode
...
files.
bitcode files are the only LLVM format left.
llvm-svn: 37945
2007-07-06 13:38:17 +00:00
Gabor Greif
5f705671e4
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Chris Lattner
5fc47d5385
adjust this to live in lib/Archive
...
llvm-svn: 36886
2007-05-06 19:49:28 +00:00