1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

232 Commits

Author SHA1 Message Date
Ahmed Charles
0f014a86bf Fix warnings about an variable only used in asserts.
llvm-svn: 203089
2014-03-06 06:35:46 +00:00
Ahmed Charles
52ce0c101e Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
Rafael Espindola
1b07b35205 Use DataLayout from the module when easily available.
Eventually DataLayoutPass should go away, but for now that is the only easy
way to get a DataLayout in some APIs. This patch only changes the ones that
have easy access to a Module.

One interesting issue with sometimes using DataLayoutPass and sometimes
fetching it from the Module is that we have to make sure they are equivalent.
We can get most of the way there by always constructing the pass with a Module.
In fact, the pass could be changed to point to an external DataLayout instead
of owning one to make this stricter.

Unfortunately, the C api passes a DataLayout, so it has to be up to the caller
to make sure the pass and the module are in sync.

llvm-svn: 202204
2014-02-25 23:25:17 +00:00
Rafael Espindola
32da4bdd4b Make DataLayout a plain object, not a pass.
Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM
don't don't handle passes to also use DataLayout.

llvm-svn: 202168
2014-02-25 17:30:31 +00:00
Rafael Espindola
d89ca7eab7 Replace the F_Binary flag with a F_Text one.
After this I will set the default back to F_None. The advantage is that
before this patch forgetting to set F_Binary would corrupt a file on windows.
Forgetting to set F_Text produces one that cannot be read in notepad, which
is a better failure mode :-)

llvm-svn: 202052
2014-02-24 18:20:12 +00:00
Rafael Espindola
aea6192f20 Add back r201608, r201622, r201624 and r201625
r201608 made llvm corretly handle private globals with MachO. r201622 fixed
a bug in it and r201624 and r201625 were changes for using private linkage,
assuming that llvm would do the right thing.

They all got reverted because r201608 introduced a crash in LTO. This patch
includes a fix for that. The issue was that TargetLoweringObjectFile now has
to be initialized before we can mangle names of private globals. This is
trivially true during the normal codegen pipeline (the asm printer does it),
but LTO has to do it manually.

llvm-svn: 201700
2014-02-19 17:23:20 +00:00
Rafael Espindola
5bdf119d0c This reverts commit r201625 and r201624.
Since r201608 got reverted, it is not safe to use private linkage in these cases
until it is committed back.

llvm-svn: 201688
2014-02-19 15:49:46 +00:00
Rafael Espindola
e24a4a66da Use PrivateLinkage now that it is safe.
Now that llvm's codegen knows to use an 'l' prefix when needed, we can just
use PrivateLinkage.

llvm-svn: 201624
2014-02-19 01:46:57 +00:00
Rafael Espindola
2db67019d3 Don't try to build ExceptionDemo on ARM.
The demo uses _Unwind_GetIP which is not available on that platform.

llvm-svn: 201261
2014-02-12 21:47:15 +00:00
Chandler Carruth
20415ba0f4 [cleanup] Re-sort the examples #include lines with my sort_includes
script.

llvm-svn: 199089
2014-01-13 09:58:03 +00:00
Chandler Carruth
9af0f97115 [cleanup] Fix the includes in the examples for r199082.
llvm-svn: 199087
2014-01-13 09:53:45 +00:00
NAKAMURA Takumi
955efe24ce [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196908
2013-12-10 11:13:32 +00:00
Juergen Ributzka
990c8318f8 [weak vtables] Place class definitions into anonymous namespaces to prevent weak vtables.
This patch places class definitions in implementation files into anonymous
namespaces to prevent weak vtables. This eliminates the need of providing an
out-of-line definition to pin the vtable explicitly to the file.

llvm-svn: 195092
2013-11-19 03:08:35 +00:00
Juergen Ributzka
5357a6d64b [weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file. The memory leaks in this version have been fixed. Thanks
Alexey for pointing them out.

Differential Revision: http://llvm-reviews.chandlerc.com/D2068

Reviewed by Andy

llvm-svn: 195064
2013-11-19 00:57:56 +00:00
Alexey Samsonov
3bfef6bdb6 Revert r194865 and r194874.
This change is incorrect. If you delete virtual destructor of both a base class
and a subclass, then the following code:
  Base *foo = new Child();
  delete foo;
will not cause the destructor for members of Child class. As a result, I observe
plently of memory leaks. Notable examples I investigated are:
ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl.

llvm-svn: 194997
2013-11-18 09:31:53 +00:00
Juergen Ributzka
ee3af15269 [weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file.

Differential Revision: http://llvm-reviews.chandlerc.com/D2068

Reviewed by Andy

llvm-svn: 194865
2013-11-15 22:34:48 +00:00
Will Dietz
2703980be5 Add missing #include's to cctype when using isdigit/alpha/etc.
llvm-svn: 192519
2013-10-12 00:55:57 +00:00
NAKAMURA Takumi
f0ebe1e004 ExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]
llvm-svn: 187351
2013-07-29 11:03:50 +00:00
Andrew Kaylor
208108a8e0 Adding example source to support MCJIT/Kaleidoscope blog posts.
llvm-svn: 186854
2013-07-22 18:47:24 +00:00
Rafael Espindola
5c3d709972 Remove unused fields.
llvm-svn: 186791
2013-07-21 12:42:16 +00:00
Logan Chien
7360df71c4 Fix exception demo: Add mcjit to link component.
Fix exception demo when we are building the examples with configure/make.
This commit updates the link components in the Makefile.

llvm-svn: 186785
2013-07-21 03:46:55 +00:00
Rafael Espindola
8abfbec9d8 Update the examples for an API change.
llvm-svn: 186453
2013-07-16 20:22:35 +00:00
NAKAMURA Takumi
8365b7affd ExceptionDemo: Corresponding to r181820, SectionMemoryManager should belong to RTDyldMemoryManager.
llvm-svn: 181844
2013-05-14 23:05:00 +00:00
Rafael Espindola
b0598a0361 Remove exception handling support from the old JIT.
llvm-svn: 181354
2013-05-07 20:53:59 +00:00
Rafael Espindola
4ae75aafcb Port ExceptionDemo to MCJIT.
llvm-svn: 181168
2013-05-05 20:57:58 +00:00
Rafael Espindola
c8f540342b Add support for other typeinfo encodings in the ExceptionDemo.
The old jit always uses DW_EH_PE_absptr, but MCJIT can use other encodings.
This is in preparation for adding EH support to MCJIT, but not directly
related, so I am committing it first.

llvm-svn: 180883
2013-05-01 21:05:05 +00:00
Rafael Espindola
bea78af644 The exception demo needs its symbols exported.
llvm-svn: 180622
2013-04-26 19:07:40 +00:00
Dmitri Gribenko
cf73a60f87 Update links to "Itanium C++ ABI: Exception Handling" document
llvm-svn: 172356
2013-01-13 15:53:09 +00:00
Chandler Carruth
0b1298b398 Update the examples for the new header file locations.
Sorry for the fallout here, I forgot the examples aren't built by
default any more.

llvm-svn: 171371
2013-01-02 11:56:33 +00:00
Chandler Carruth
cb969e4938 Sort the #include lines of the examples/... tree.
llvm-svn: 169249
2012-12-04 10:16:57 +00:00
Rafael Espindola
07695ce31f Fix gcc's -Wunused-but-set-variable warnings.
llvm-svn: 168576
2012-11-26 00:56:44 +00:00
Micah Villmow
ce5e56a156 Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!
llvm-svn: 166596
2012-10-24 17:25:11 +00:00
Micah Villmow
ae5ce80c36 Delete a directory that wasn't supposed to be checked in yet.
llvm-svn: 166591
2012-10-24 17:20:04 +00:00
Quentin Colombet
574305e5fe Test commit access
llvm-svn: 166481
2012-10-23 16:03:18 +00:00
NAKAMURA Takumi
100b5cd40b ExceptionDemo.cpp: Use Function::setDoesNotReturn(). Attributes stuff was updated.
llvm-svn: 165796
2012-10-12 14:11:48 +00:00
NAKAMURA Takumi
ca189ff532 ExceptionDemo.cpp: Whitespace.
llvm-svn: 165795
2012-10-12 14:11:43 +00:00
Micah Villmow
23edd59649 Move TargetData to DataLayout.
llvm-svn: 165401
2012-10-08 16:37:04 +00:00
Chandler Carruth
4b51f99c87 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
7a500ef0b0 Remove trailing whitespaces
llvm-svn: 158943
2012-06-21 22:26:01 +00:00
Benjamin Kramer
bb30e1face Fix typos found by http://github.com/lyda/misspell-check
llvm-svn: 157885
2012-06-02 10:20:22 +00:00
Michael J. Spencer
e6c28a171e 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
d4b1931dd9 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
b5e95a7fb3 Update ExceptionDemo to use ConstantDataArray.
llvm-svn: 149867
2012-02-06 14:09:13 +00:00
Bill Wendling
7ef169f2d2 Update to the new EH system...remove OLD EH code.
llvm-svn: 149728
2012-02-04 00:29:12 +00:00
Francois Pichet
81cb90c91f Fix BrainF compilation.
llvm-svn: 149375
2012-01-31 09:35:01 +00:00
Daniel Dunbar
30d6a45140 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Peter Collingbourne
7f575840c2 EngineBuilder: support for custom TargetOptions. Fixes the
ExceptionDemo example.

llvm-svn: 146108
2011-12-07 23:58:57 +00:00
Daniel Dunbar
3760ebeebb build: Add initial cut at LLVMBuild.txt files.
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Garrison Venn
473050b066 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
d0c68eb6c0 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