Commit Graph

2355 Commits

Author SHA1 Message Date
Nick Lewycky
b454eabe7f Correct strange whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 07:01:00 +00:00
Nick Lewycky
ea97aa6129 Free the buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 01:58:34 +00:00
Chris Lattner
7d8f9b6133 fix PR3488: llvm-ar r doesn't replace existing files
Patch by Daniel Shelton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63870 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 17:58:39 +00:00
Duncan Sands
7a2e7e5c20 Revert the previous commit. It seems it didn't
really solve the problem.  Also it changed the
name from libLLVMgold to LLVMgold (correcting
the name resulted in the original problem
suddenly reappearing).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 10:21:34 +00:00
Duncan Sands
105de28dab Stop llvm-config thinking that there are circular
dependencies between libraries due to __dso_handle
when doing "make install".  I don't know what the
LINK_COMPONENTS stuff is about, so I left it alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 09:54:02 +00:00
Nick Lewycky
98245c7060 It's not obvious, but lto_module_create_from_memory doesn't need to use the
buffer after it creates the Module. Thus, we don't need to store this pointer
in claimed_file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 05:36:01 +00:00
Nick Lewycky
c1da8864a9 Remove accidentally included debug message!
Reword a comment for clarity. Remove some extra whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 04:14:23 +00:00
Torok Edwin
6cbbdfd2e9 Alphabetize includes. Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 21:00:02 +00:00
Torok Edwin
1845d99041 mention that PIC is needed for libLTO and libLLVMgold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 19:12:25 +00:00
Torok Edwin
4cb16349b0 remove printf - it was there only for debugging!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 17:40:28 +00:00
Torok Edwin
3e5a0d8b0b add support for .a files containing LLVM IR to the gold plugin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 17:39:30 +00:00
Nick Lewycky
3e62b2dc93 Add LLVM plugin for gold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63623 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 07:13:24 +00:00
Mikhail Glushenkov
7ba6052852 Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 02:12:57 +00:00
Mikhail Glushenkov
19d3e82905 Add three new option properties.
Adds new option properties 'multi_val', 'one_or_more' and 'zero_or_one'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 03:47:20 +00:00
Nick Lewycky
1281741311 Build libLTO on any platform so long as PIC is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-26 03:04:57 +00:00
Mike Stump
0a26891ce9 Perform optional clang building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-24 00:00:41 +00:00
Mikhail Glushenkov
e441b831c0 Fix 'llvm-config --libs' output.
Change the naming scheme for llvmc plugins so that they do not appear in
'llvm-config --libs' output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 13:05:00 +00:00
Mikhail Glushenkov
b6b514124d Change the hook API back to prevent memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 13:04:33 +00:00
Mikhail Glushenkov
a298bb7525 Allow hooks with arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 13:04:00 +00:00
Mikhail Glushenkov
2388a588bd Registry.h should not depend on CommandLine.h.
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62312 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5c1799b293 Delete trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62307 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 06:53:46 +00:00
Rafael Espindola
bb46f52027 Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 20:18:42 +00:00
Mikhail Glushenkov
f9b1d79a54 Some small documentation fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 02:42:40 +00:00
Mikhail Glushenkov
564b75a4c6 Clarify the documentation a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 02:04:54 +00:00
Mikhail Glushenkov
15b064d045 Make -o a prefix option.
Both 'llvmc -o file' and 'llvmc -ofile' should work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 02:02:16 +00:00
Mikhail Glushenkov
f8c430b3da Add a --check-graph option to llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 16:16:27 +00:00
Oscar Fuentes
82447ebb41 CMake: replace `rm' with portable invocations of cmake.
Based on a bug report by Yonggang Luo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 19:24:44 +00:00
Chris Lattner
5d5a897529 make llvm-ld smart enough to link against native libraries that are
not in system library directories by checking -L paths as well.
Patch by Axel Naumann!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:01:32 +00:00
Bill Wendling
93d9ad567d Setting BUILD_ARCHIVE to 0 has the same effect as defining it to 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61599 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-03 01:48:26 +00:00
Chris Lattner
df98617b23 Reimplement the old and horrible bison parser for .ll files with a nice
and clean recursive descent parser.

This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
   including what is autogenerated).
2. The code should be significantly faster than the old code because we 
   don't have to work around bison's poor handling of datatypes with 
   ctors/dtors.  This also makes the code much more resistant to memory 
   leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
   so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32".  There was no good
   reason to support this, it was just an accident of the old 
   implementation.  I have no reason to think that anyone is actually using
   this.
6. The syntax for sticking a global variable has changed to make it 
   unambiguous.  I don't think anyone is depending on this since only clang
   supports this and it is not solid yet, so I'm not worried about anything
   breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
   I'll prune this from the makefiles as a subsequent commit.

There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 07:01:27 +00:00
Misha Brukman
f2f8d79790 Add spacing between type and variable name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61530 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 17:41:49 +00:00
Misha Brukman
8050e9e854 Comment headers should extend to 80 chars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61529 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 17:40:52 +00:00
Misha Brukman
262b05f637 Fix spacing to be uniform for parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 17:39:58 +00:00
Duncan Sands
9e89ba31f1 Rename AddReadAttrs to FunctionAttrs, and teach it how
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape.  Mark such arguments 'nocapture'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 16:14:43 +00:00
Mikhail Glushenkov
5c2b6b26c9 Some enhancements for the 'case' expression.
Add (error) and (empty).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61117 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 02:47:01 +00:00
Mikhail Glushenkov
23f522a545 Add a comment to the auto-generated docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60985 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 17:51:47 +00:00
Mikhail Glushenkov
8cc8288bef Merge llvm-rst.css and llvm.css.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60984 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 17:50:58 +00:00
Mikhail Glushenkov
462886e8ad Some more documentation tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60970 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 03:11:37 +00:00
Mikhail Glushenkov
d565203d96 More cosmetic tweaks for llvmc docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60969 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 02:28:58 +00:00
Mikhail Glushenkov
905315441e Fix W3C validator errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 23:43:14 +00:00
Mikhail Glushenkov
99a3a2c44c Use correct file for the llvmc tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60910 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 23:33:33 +00:00
Mikhail Glushenkov
68319f87cc Update the auto-generated llvmc documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 23:24:40 +00:00
Mikhail Glushenkov
ba71d677dd Add a '-Wo,' option that passes options to opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60902 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 22:19:14 +00:00
Mikhail Glushenkov
de1e521648 Merge Base.td and Tools.td.
This stuff is not used outside Base.td, and with the conversion of the
compilation graph to string-based format became much less (if at all)
useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 10:38:06 +00:00
Mikhail Glushenkov
74bcb057c0 Support -emit-llvm properly (with -S and -c).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 14:40:18 +00:00
Dan Gohman
70ef449741 Generalize bugpoint's concept of a "safe" backend, and add options
to allow the "safe" backend to be run with a different path, and/or
with different command-line options.

This enables the following use cases:
 - bugpoint llc against an llc command from a different build
 - bugpoint llc against the same llc with different command-line options
 - and more...

Also, document the existing "custom" interpreter options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:02:47 +00:00
Oscar Fuentes
f76eda70fa CMake: Added Tool.cpp to tools/llvmc/driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60670 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 17:01:16 +00:00
Mikhail Glushenkov
4410e3203d Describe recent changes in the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:47:42 +00:00
Mikhail Glushenkov
b4ced5a3c4 Make 'extern' an option property.
Makes (forward) work better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:47:12 +00:00
Mikhail Glushenkov
940cdfe697 Plugin updates: support more options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:46:23 +00:00