Commit Graph

15451 Commits

Author SHA1 Message Date
Brian Gaeke a057cd2401 Give a better message for a common assertion failure.
llvm-svn: 17887
2004-11-16 06:52:35 +00:00
Reid Spencer f0173e0c48 Add a comment to some code that at first glance just doesn't look right.
llvm-svn: 17886
2004-11-16 06:50:36 +00:00
Reid Spencer 5208a11440 Per code review:\
* Adjust indentation\
* Ensure memory do not leak if exceptions happen (std::auto_ptr use)

llvm-svn: 17885
2004-11-16 06:47:41 +00:00
Reid Spencer 8d784fbd3f Per code review:\
* Make the numVbrBytes function more efficient and better documented \
* Fix a bug in name truncation \
* Add comments before functions \
* Get rid of functions that are now inlined into the header \
* Do not have Archive doing symbol table printing \
* Put assert comments into the assert so they print out \
* Make sure foreign symbol tables are written

llvm-svn: 17884
2004-11-16 06:47:30 +00:00
Reid Spencer 4abd79e8ea Per code review:\
* Make sure we write out the foreign symbol table if we read one \
* Make the padding calculation more efficiently and avoid Solaris warnings

llvm-svn: 17883
2004-11-16 06:47:19 +00:00
Reid Spencer 40878f35de Per code review:\
* Make sure all members are initialized upon construction

llvm-svn: 17882
2004-11-16 06:47:07 +00:00
Reid Spencer 6d737f5d24 Per code review:\
* Use STL names for STL operations \
* Do not have Archive doing symbol table printing \
* Avoid compiler warnings about only having private constructors.

llvm-svn: 17881
2004-11-16 06:46:55 +00:00
Chris Lattner f2e808449d The second arg may be clobbered by this function
llvm-svn: 17880
2004-11-16 06:41:36 +00:00
Chris Lattner 5d6c23606d Document this as clobbering the second arg, make the second arg be non-const
llvm-svn: 17879
2004-11-16 06:41:21 +00:00
Reid Spencer 66dc515ed6 Per code review: \
* Make static things static \
* Get rid of unused TmpArchive variable \
* Implement symbol table printing \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.

llvm-svn: 17878
2004-11-16 06:41:20 +00:00
Reid Spencer 9fc38b1712 Per code review: \
* hide the compatibility option \
* Make static things static \
* Use cl::extrahelp instead of cl::MoreHelp (defunct) \
* Use cl::PrintHelpMessage instead of our own printUse function \
* Use a std::set<sys::Path> for the path list because its now required by \
  the sys::Path class and also ensues directories are traversed in sorted \
  order.\
* Implement symbol table printing locally instead of in libLLVMArchive \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.

llvm-svn: 17877
2004-11-16 06:41:09 +00:00
Reid Spencer 2df70a7e2f Per code review:\
* Get rid of memory leaks on exception \
* Provide better comments of how the memory handling works

llvm-svn: 17876
2004-11-16 06:41:05 +00:00
Chris Lattner 2981914302 use an autoptr
llvm-svn: 17875
2004-11-16 06:40:54 +00:00
Chris Lattner d308797cae Make this code not depend on LinkModules leaving the second argument unmolested.
llvm-svn: 17874
2004-11-16 06:31:38 +00:00
Reid Spencer 09e9f2a37b Per code review:
* get rid of (void) construct in function declarations
* make toString a const member
* add a default implementation of toString for Win32

llvm-svn: 17873
2004-11-16 06:22:17 +00:00
Reid Spencer 91f505eae9 Per code review:
* Clean up the StatusInfo constructor to construct all members and give
  them reasonable values.
* Get rid of the Vector typedef and make the interface to
  getDirectoryContent use a std::set instead of a std::vector so the dir
  content is sorted.
* Make the getStatusInfo method const and not return a useless boolean.

llvm-svn: 17872
2004-11-16 06:15:19 +00:00
Reid Spencer 5e5547045b Per code review:
*Implement/Document the cl::extrahelp feature instead of the MoreHelp ptr.

llvm-svn: 17871
2004-11-16 06:11:52 +00:00
Chris Lattner f242979cd0 Simplify namespaces
llvm-svn: 17870
2004-11-16 04:47:33 +00:00
Chris Lattner 6b7652fae5 Remove a dead function, which died when we got GAS emission working (phwew,
hold your nose!)

llvm-svn: 17869
2004-11-16 04:34:29 +00:00
Chris Lattner c927072b50 Implement a simple FIXME: if we are emitting a basic block address that has
already been emitted, we don't have to remember it and deal with it later,
just emit it directly.

llvm-svn: 17868
2004-11-16 04:30:51 +00:00
Chris Lattner 2e182fc39b * Merge some win32 ifdefs together
* Get rid of "emitMaybePCRelativeValue", either we want to emit a PC relative
  value or not: drop the maybe BS.  As it turns out, the only places where
  the bool was a variable coming in, the bool was a dynamic constant.

llvm-svn: 17867
2004-11-16 04:21:18 +00:00
Misha Brukman b4bd8de9a4 * Change test/projects => projects/llvm-test
* Add link to complete Command Guide in the "brief intro to major tools" section

llvm-svn: 17866
2004-11-15 23:20:51 +00:00
Chris Lattner 58d5b2a9bb Add an accessor
llvm-svn: 17865
2004-11-15 23:20:19 +00:00
Chris Lattner 1edd79a1bc Now that we have ghost linkage, we can force resolution of external symbols
immediately instead of lazily.

In this program, for example:

int main() {
  printf("hello world\n");
  printf("hello world\n");
  printf("hello world\n");
  printf("hello world\n");
}

We used to have to go through compilation callback 4 times (once for each
call to printf), now we don't go to it at all.

Thanks to Misha for noticing this, and for adding the initial ghost linkage
patches.

llvm-svn: 17864
2004-11-15 23:20:04 +00:00
Chris Lattner b264f7f428 There is no reason to try to materialize the function from bytecode if it
already has been.  This may be a small speedup.

llvm-svn: 17863
2004-11-15 23:18:09 +00:00
Chris Lattner 9cc2dac7c1 Add debug-only=jit printout, so we see when lazily resolved symbols are
set up.

llvm-svn: 17862
2004-11-15 23:16:55 +00:00
Chris Lattner 34b754d99b Simplify and rearrange long shift code
llvm-svn: 17861
2004-11-15 23:16:34 +00:00
Chris Lattner 97f5c0e5df Update to reflect recent change
llvm-svn: 17860
2004-11-15 22:54:50 +00:00
Chris Lattner 3b6bb48c16 Do not emit FunctionBlock blocks for external functions. This shrinks
bytecode files by about 8 bytes per external function

llvm-svn: 17859
2004-11-15 22:39:49 +00:00
Chris Lattner 642f8c5ed4 Use a per-function flag bit to indicate whether or not there is a function
body for the function.

llvm-svn: 17858
2004-11-15 22:38:52 +00:00
Chris Lattner 9b457e1c73 Disable this change, it was premature
llvm-svn: 17857
2004-11-15 21:56:33 +00:00
Chris Lattner 7d04cdab77 Make *SURE* to null out the pointer before throwing an exception, otherwise
the dtor for the BytecodeReader class will try to free it again!

llvm-svn: 17856
2004-11-15 21:55:33 +00:00
Chris Lattner 36c95e38b0 Cleanups. Null out pointer after freeing it for paranoia
llvm-svn: 17855
2004-11-15 21:55:06 +00:00
Chris Lattner 94bd315c3f If a function is external, do not output a FunctionBlock for the function
AT ALL.  This saves 11 bytes per external function from the bytecode file,
and is also required to make GhostLinkage work.

llvm-svn: 17854
2004-11-15 21:46:40 +00:00
Chris Lattner 55d85402f6 Make functions default to having external linkage if they have no
FunctionBlock.

llvm-svn: 17853
2004-11-15 21:43:03 +00:00
Reid Spencer 16d3f968ba Remove useless/confusing namespace qualifier.
llvm-svn: 17852
2004-11-15 21:27:05 +00:00
Misha Brukman a8c99d4daf Add BCTR and LWZU instruction opcodes
llvm-svn: 17851
2004-11-15 21:20:09 +00:00
Reid Spencer 38fcf309fc Merge content of RequiredSoftware.html into GettingStarted.html
Remove now defunct RequiredSoftware.html.

llvm-svn: 17850
2004-11-15 21:15:12 +00:00
Misha Brukman dca7238d56 * Add entry for Linux/PowerPC
* Mark MacOS X/PPC support as 32-bit-only
* Fix FreeBSD space usage -- it's in MB, not GB

llvm-svn: 17848
2004-11-15 21:05:08 +00:00
Misha Brukman ef8d601a53 Be less verbose when `The' and `command' just aren't necessary
llvm-svn: 17846
2004-11-15 20:39:30 +00:00
Misha Brukman 6c668c4fba No need for the verbose `the llvm-link command' when simply `llvm-link' will do
llvm-svn: 17845
2004-11-15 20:36:39 +00:00
Misha Brukman 16c9176043 Force a short link to gccld's man page
llvm-svn: 17844
2004-11-15 20:32:58 +00:00
Misha Brukman da25907381 Fix syntax within a B<> tag
llvm-svn: 17843
2004-11-15 20:30:19 +00:00
Reid Spencer e51e5724b7 Remove personal email address.
llvm-svn: 17842
2004-11-15 20:25:08 +00:00
Misha Brukman 4055d31868 Add the PowerPC 32-bit ABI output option
llvm-svn: 17840
2004-11-15 20:22:49 +00:00
Chris Lattner cc93ee5b45 Bump version. Shouldn't this come from somewhere else??
llvm-svn: 17839
2004-11-15 20:06:11 +00:00
Misha Brukman a8e1718932 * Add an entry for llvm-ranlib
* Add missing dashes

llvm-svn: 17838
2004-11-15 19:53:43 +00:00
Misha Brukman 774a6be462 This is llvm-ar, not llvm-as.
llvm-svn: 17837
2004-11-15 19:50:15 +00:00
Reid Spencer d4d25bdb2b Remove reference to llvm-ld.
llvm-svn: 17836
2004-11-15 19:47:20 +00:00
Reid Spencer 38f5a1c6c4 Terminate a list.
Remove reference to llvm-ld

llvm-svn: 17835
2004-11-15 19:45:29 +00:00