Commit Graph

112 Commits

Author SHA1 Message Date
Rafael Espindola 8c8117240c keep only the StringRef version of getFileOrSTDIN.
llvm-svn: 184826
2013-06-25 05:28:34 +00:00
Guy Benyei 83c74e9fad Add static cast to unsigned char whenever a character classification function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.
llvm-svn: 175006
2013-02-12 21:21:59 +00:00
Bill Wendling d7e05d628a Update with attribute group IDs.
llvm-svn: 174847
2013-02-10 23:17:10 +00:00
Chris Lattner 0271af8dc9 switch llvm-bcanalyzer onto the new cursor APIs, allowing deletion of
the old ReadRecord methods.

llvm-svn: 172952
2013-01-20 02:50:32 +00:00
Chris Lattner 3fa323d7d3 fix method name.
llvm-svn: 172921
2013-01-19 21:37:14 +00:00
Chandler Carruth 4d88a1c233 Sort the #include lines for tools/...
Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.

llvm-svn: 169252
2012-12-04 10:44:52 +00:00
Bill Wendling 706d3d66e9 Add back support for reading and parsing 'deplibs'.
This is for backwards compatibility for pre-3.x bc files. The code reads the
code, but does nothing with it.

llvm-svn: 168779
2012-11-28 08:41:48 +00:00
Bill Wendling ee5984df39 Remove the dependent libraries feature.
The dependent libraries feature was never used and has bit-rotted. Remove it.

llvm-svn: 168694
2012-11-27 09:55:56 +00:00
Joerg Sonnenberger 4a0f7becd8 Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.

llvm-svn: 166767
2012-10-26 10:49:15 +00:00
Roman Divacky ad06cee239 Stop casting away const qualifier needlessly.
llvm-svn: 163258
2012-09-05 22:26:57 +00:00
Jan Wen Voung 5020dd35e5 Fix a bug.
llvm-svn: 163242
2012-09-05 20:56:00 +00:00
Jan Wen Voung 05ff570139 revert the additional stuff.
llvm-svn: 163241
2012-09-05 20:55:57 +00:00
Jan Wen Voung 52ad208146 Clean up llvm-bcanalyzer to print to consistent streams.
Avoid interleaving fprintf(stderr,...) and outs() << ...;

Also add a column to show "bytes-per" for each record.

llvm-svn: 163240
2012-09-05 20:55:54 +00:00
Chris Lattner 633ab168a8 fix PR12301 - llvm-bcanalyze should print to stdout, not stderr (except for errors).
llvm-svn: 153065
2012-03-19 23:40:48 +00:00
Derek Schuff 8b2dcad4b5 Enable streaming of bitcode
This CL delays reading of function bodies from initial parse until
materialization, allowing overlap of compilation with bitcode download.

llvm-svn: 149918
2012-02-06 22:30:29 +00:00
Bill Wendling b03c224e10 [unwind removal] Remove a the obsolete 'unwind' enum value.
llvm-svn: 149911
2012-02-06 21:55:35 +00:00
Chris Lattner 372dd1ea18 Add bitcode reader and writer support for ConstantDataAggregate, which
should be feature complete now.  Lets see if it works.

llvm-svn: 149215
2012-01-30 00:51:16 +00:00
David Blaikie edbb58c577 Remove unnecessary default cases in switches that cover all enum values.
llvm-svn: 147855
2012-01-10 16:47:17 +00:00
Daniel Dunbar 27a7489a03 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Chad Rosier dd4ffaec8f Update bcanalyzer to handle new USELIST_BLOCK/USELIST_CODE_ENTRY.
llvm-svn: 146079
2011-12-07 21:45:13 +00:00
Chris Lattner 1c9e5678b8 remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible back to 3.0
llvm-svn: 145164
2011-11-27 05:48:27 +00:00
Daniel Dunbar 57fb3ae997 LLVMBuild: Add description files for the LLVM tools.
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Chad Rosier 9589872af9 Remove some cruft from the BitcodeWriter, while still maintaining backward
compatibility in the BitcodeReader.

llvm-svn: 143598
2011-11-03 00:14:01 +00:00
Daniel Dunbar 96d812a68d build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
new all-targets pseudo-component.

llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Chris Lattner b1ed91f397 Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead 
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.  
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

llvm-svn: 134829
2011-07-09 17:41:24 +00:00
Chris Lattner c4407080dd Drop the "2" suffix on some enums.
llvm-svn: 133274
2011-06-17 18:17:37 +00:00
Chris Lattner f1c871098d remove support for a bunch of obsolete instruction encodings
and other backward compatibility hacks.

llvm-svn: 133273
2011-06-17 18:09:11 +00:00
Chris Lattner b877855bea Remove some "2" suffixes from the metadata enums now that "1" is gone.
llvm-svn: 133269
2011-06-17 17:50:30 +00:00
Chris Lattner 2feca50969 remove bitcode reader support for LLVM 2.7 metadata encoding.
llvm-svn: 133268
2011-06-17 17:48:53 +00:00
NAKAMURA Takumi ce60d4cd4d llvm-bcanalyzer.cpp: Tweak format string to suppress warnings on mingw32-g++.
llvm-svn: 127858
2011-03-18 03:21:04 +00:00
Chris Lattner cee9db2b6f fix dumping of METADATA_ATTACHMENT2 names, patch by Peter Housel!
llvm-svn: 125367
2011-02-11 05:50:01 +00:00
Michael J. Spencer 39a0ffc394 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
Dan Gohman f749ad734f Give CurStreamType's enum a name. This works around what is apparently
a bug in Apple GCC 4.0.

llvm-svn: 121409
2010-12-09 20:35:40 +00:00
Michael J. Spencer 7b6fef82d4 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 447762da85 Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Michael J. Spencer 93c9b2ea93 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer dc38d36ccb CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Dan Gohman 6dbbab6895 Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.

The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.

llvm-svn: 113557
2010-09-09 23:12:39 +00:00
Dan Gohman 3d051ff2bc Remove an unused command-line option.
llvm-svn: 111367
2010-08-18 17:20:51 +00:00
Dan Gohman aa28801f6a Make llvm-bcanalyzer print out the full enum name for all metadata
code ids, not just some of them.

llvm-svn: 108543
2010-07-16 18:28:07 +00:00
Chris Lattner 07d09ed49a Add special case bitcode support for DebugLoc. This avoids
having the bitcode writer materialize mdnodes for all the
debug location tuples when writing out the bc file and 
stores the information in a more compact form.  For example,
the -O0 -g bc file for combine.c in 176.gcc shrinks from
739392 to 512096 bytes.

This concludes my planned short-term debug info work.

llvm-svn: 100261
2010-04-03 02:17:50 +00:00
Chris Lattner ebc6f14766 add a couple missing enum names.
llvm-svn: 100257
2010-04-03 01:05:24 +00:00
Chris Lattner 7ba0661f27 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Daniel Dunbar e813b22b13 Make llvm-bcanalyzer percentages more readable.
llvm-svn: 82772
2009-09-25 16:04:21 +00:00
Daniel Dunbar 75359a7c2f Strip trailing whitespace.
llvm-svn: 82771
2009-09-25 16:03:57 +00:00
Duncan Sands 3cf0cdee4c Print INST_INBOUNDS_GEP rather than UnknownCode30.
Likewise for constant inbounds GEP.

llvm-svn: 82763
2009-09-25 12:28:37 +00:00
Devang Patel af206b8c88 Write and read metadata attachments.
llvm-svn: 82259
2009-09-18 19:26:43 +00:00
Duncan Sands 54dd438394 Fix the build when using gcc-4.4 on linux. Header needed
for stderr and fprintf.

llvm-svn: 79909
2009-08-24 10:59:01 +00:00
Chris Lattner c521f54198 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
Devang Patel 5ac2f49516 Handle NamedMDNode.
llvm-svn: 77633
2009-07-30 23:03:19 +00:00