Commit Graph

195 Commits

Author SHA1 Message Date
Chandler Carruth aafe0918bc Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h
This was always part of the VMCore library out of necessity -- it deals
entirely in the IR. The .cpp file in fact was already part of the VMCore
library. This is just a mechanical move.

I've tried to go through and re-apply the coding standard's preferred
header sort, but at 40-ish files, I may have gotten some wrong. Please
let me know if so.

I'll be committing the corresponding updates to Clang and Polly, and
Duncan has DragonEgg.

Thanks to Bill and Eric for giving the green light for this bit of cleanup.

llvm-svn: 159421
2012-06-29 12:38:19 +00:00
Arnaud A. de Grandmaison 503ca9e6a7 Remove trailing whitespaces
llvm-svn: 158943
2012-06-21 22:26:01 +00:00
Benjamin Kramer bde9176663 Fix typos found by http://github.com/lyda/misspell-check
llvm-svn: 157885
2012-06-02 10:20:22 +00:00
Michael J. Spencer 9125493efe Remove llvm-ld and llvm-stub (which is only used by llvm-ld).
llvm-ld is no longer useful and causes confusion and so it is being removed.

* Does not work very well on Windows because it must call a gcc like driver to
  assemble and link.
* Has lots of hard coded paths which are wrong on many systems.
* Does not understand most of ld's options.
* Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} |
  ld, or fully replaced by Clang.

I know of no production use of llvm-ld, and hacking use should be
replaced by Clang's driver.

llvm-svn: 155147
2012-04-19 19:27:54 +00:00
Chandler Carruth 3bb7d41a35 Switch to a more idiomatic way of silencing unused variable warnings in
release builds. Silences clang's -Wself-assign.

llvm-svn: 150942
2012-02-20 00:02:49 +00:00
Peter Collingbourne c4e342b733 Update ExceptionDemo to use ConstantDataArray.
llvm-svn: 149867
2012-02-06 14:09:13 +00:00
Bill Wendling 383727b63c Update to the new EH system...remove OLD EH code.
llvm-svn: 149728
2012-02-04 00:29:12 +00:00
Francois Pichet 4ce6e6ef87 Fix BrainF compilation.
llvm-svn: 149375
2012-01-31 09:35:01 +00:00
Daniel Dunbar 27a7489a03 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Peter Collingbourne dff247868a EngineBuilder: support for custom TargetOptions. Fixes the
ExceptionDemo example.

llvm-svn: 146108
2011-12-07 23:58:57 +00:00
Daniel Dunbar bf9bba47a1 build: Add initial cut at LLVMBuild.txt files.
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Garrison Venn 56c58ce3d6 Changed comments on foreign C++ exceptions (generated with type info 7),
handling with references to 
http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (r 1.22).

llvm-svn: 140695
2011-09-28 10:53:56 +00:00
Garrison Venn 0a2eb8d35d Modified demo to use 3.0 resume instruction vs calling _Unwine_Resume.
Also conducted some reformatting. As the LLVM coding standard doc does not
seem to touch on how to align function arguments, and format code longer than
80 cols in general, the confusion persists. There is the golden rule, but as
this code has gone through several styles to deal with this, the golden rule
seems to be ignored. The latest reformatting effort tries to match the other
source files as much as possible.

Tested on OS X 10.7.1 with, and without the OLD_EXC_SYSTEM defined. Have NOT
tested on LINUX.

llvm-svn: 140379
2011-09-23 14:45:10 +00:00
Garrison Venn 8cb0035ee9 Converted Exception demo over to using new 3.0 landingpad instruction. This
was compiled and tested on OS X 10.7.1. It was not tested on LINUX. In 
addition the defined OLD_EXC_SYSTEM was not tested with this version.

llvm-svn: 140303
2011-09-22 15:45:14 +00:00
Garrison Venn eb89d36b9d This is a hack to get the demo working with the new 3.0 exception
infrastructure. As this makes the demo no longer a demo, and especially not a 
demo on how to use the llvm exception mechanism, this hack will shortly be 
changed to use the new 3.0 exception infrastructure. However for the time being 
this demo is an example on how to use the AutoUpgrade 
UpgradeExceptionHandling(...) function on < 3.0 exception handling code.                          

llvm-svn: 140301
2011-09-22 14:07:50 +00:00
Evan Cheng 2bb4035707 Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Jay Foad ed8db7d9df Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.

llvm-svn: 135673
2011-07-21 14:31:17 +00:00
Chris Lattner 805d09459d update for recent api changes. I have a hard time believing that this is actually a useful example.
llvm-svn: 135374
2011-07-18 04:52:58 +00:00
Chris Lattner 6b8eb8cd71 update this to build with a recent IRBuilder change and de-constify types.
llvm-svn: 135373
2011-07-18 04:52:09 +00:00
Francois Pichet c5d10504d5 Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.
llvm-svn: 135266
2011-07-15 10:59:52 +00:00
Benjamin Kramer e6e1933f31 Change Intrinsic::getDeclaration and friends to take an ArrayRef.
llvm-svn: 135154
2011-07-14 17:45:39 +00:00
Francois Pichet ce206000d3 Remove the const from Type after of Jay deconstify work.
llvm-svn: 135000
2011-07-12 22:04:11 +00:00
Garrison Venn 76310ac9be Reverted 134901 because of 134959. Did not use svn merge -r but rather:
1,$s/llvm::Type::getInt\(..\)Ty(builder.getContext())/builder.getInt\1Ty()/g
1,$s/builder.getInt\(..*\)Ty()->getPointerTo()/builder.getInt\1PtrTy()/g

vi sub commands (second one was not a reversion but requested by 
Tobias Grosser.

Mod was tested, but other examples have failed to build as they are currently 
being thrashed with the const qualifier removal change.

llvm-svn: 134985
2011-07-12 15:34:42 +00:00
Francois Pichet ccc50d7cf4 Fix the BrainF build.
llvm-svn: 134975
2011-07-12 08:43:36 +00:00
John Wiegley 2a0177ba4c fix some examples
llvm-svn: 134933
2011-07-11 22:39:46 +00:00
Garrison Venn 5fb3f66516 Modified demo to work with non const Type parameters as is required by new
type system. However most of these modifications were due to IRBuilder
(IRBuilderBase), not having been modified to NOT return such const qualified
free types. If IRBuilder does not change, as can also be seen in its 
instruction creation methods, to use const free types, it may be useful to have
ExceptionDemo drop IRBuilder usage. Modifying builder.getInt32Ty() to
llvm::Type::getInt32Ty(builder.getContext()) is pretty ugly.

llvm-svn: 134901
2011-07-11 16:31:53 +00:00
Johnny Chen 9e4b689923 Modify comment.
llvm-svn: 132800
2011-06-09 20:11:46 +00:00
Eric Christopher 8ad343f292 Have the JIT tutorial use IRBuilder for the IR.
Patch by Jake Waskett!

llvm-svn: 132770
2011-06-09 05:58:50 +00:00
Chris Lattner 0ab5e2cded Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Garrison Venn a0f6ecb01f Added new FIXME note
llvm-svn: 129360
2011-04-12 12:30:10 +00:00
Eli Friedman 2c81975bae Get rid of useless comment; if a file uses functions from a given header,
it is obvious that it should be included.

llvm-svn: 129295
2011-04-11 20:16:05 +00:00
Garrison Venn 56c5ca2ee1 Because some systems have reported that this example would not build the
header file cstdio was added as an include.

llvm-svn: 129291
2011-04-11 19:52:49 +00:00
Garrison Venn 88bd9d6bb8 Fixed more best practices, and explicit/implicit style guide issues.
llvm-svn: 129245
2011-04-10 14:06:52 +00:00
Chris Lattner a868bbbb66 reindent this whole file and do a variety of stylistic cleanups.
This code is still a long way from following best practices.

llvm-svn: 129140
2011-04-08 18:02:51 +00:00
Chris Lattner ca320f54da fix this to build with the recent StructType changes.
llvm-svn: 129139
2011-04-08 17:56:47 +00:00
Jay Foad 52131344a2 Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

llvm-svn: 128537
2011-03-30 11:28:46 +00:00
Jay Foad e0938d8a87 (Almost) always call reserveOperandSpace() on newly created PHINodes.
llvm-svn: 128535
2011-03-30 11:19:20 +00:00
Erick Tryzelaar 201b7d75b3 Fix compiling the ocaml kaleidoscope tutorials
llvm-svn: 125202
2011-02-09 18:32:02 +00:00
Oscar Fuentes 4c6340188a Do not re-test for the existence of pthread.h.
It was causing problems on the MinGW build. See PR8849.

llvm-svn: 122518
2010-12-23 21:27:22 +00:00
Dan Gohman a230754385 Fix missing includes of "llvm/Analysis/Passes.h" in the tutorials. Thanks
for Arnaud Allard de Grandmaison for preparing a patch.

llvm-svn: 119351
2010-11-16 17:28:22 +00:00
Dan Gohman 56f3a4c761 Update examples and documentation to explicitly add basicaa, now that it's
no longer included by default.

llvm-svn: 119169
2010-11-15 18:41:10 +00:00
Oscar Fuentes 889c1e7d80 Build with RTTI and exceptions disabled. Only in GCC for now.
llvm-svn: 116682
2010-10-17 02:26:16 +00:00
Duncan Sands e9da6db67f Convert a bunch of uses of 'bytecode' into 'bitcode'. This
is not everything, but the remaining cases are less trivial.

llvm-svn: 115080
2010-09-29 20:09:55 +00:00
Garrison Venn 851b323866 Removed TracingBrainF from examples Makefile.
llvm-svn: 113970
2010-09-15 14:55:32 +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
Chris Lattner 7b7768a269 fit in 80 columns and don't crash on exit, fixes PR8080
llvm-svn: 113123
2010-09-05 23:09:30 +00:00
Owen Anderson f45ee8128c Remove this from the main tree. I'll host it out of tree.
llvm-svn: 112529
2010-08-30 21:34:26 +00:00
Owen Anderson 75c205e7e2 Add a new example to the LLVM distribution: a trace-based Brainfuck compiler that uses LLVM as its code generator.
llvm-svn: 112465
2010-08-30 07:33:39 +00:00
Mikhail Glushenkov 34c5f1be0d Trailing whitespace.
llvm-svn: 111552
2010-08-19 20:03:53 +00:00