Bill Wendling
7475113d74
Revert r134888 (and related patches in other trees). It was causing
...
an assert on Darwin llvm-gcc builds.
Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, line 2067.
etc.
http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354
--- Reverse-merging r134888 into '.':
U lib/CodeGen/CodeGenModule.cpp
llvm-svn: 134950
2011-07-12 01:16:47 +00:00
Jay Foad
56cc1530ee
De-constify Types in FunctionType::get().
...
llvm-svn: 134888
2011-07-11 07:56:41 +00:00
Chris Lattner
a5f58b05e8
clang side to match the LLVM IR type system rewrite patch.
...
llvm-svn: 134831
2011-07-09 17:41:47 +00:00
Cameron Zwarich
be652e6a24
r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,
...
so roll it out.
llvm-svn: 134638
2011-07-07 21:03:28 +00:00
Nick Lewycky
d755e6ac48
A redeclaration of an inline method in C99 mode should trigger emission of that
...
function. Fixes PR10233!
llvm-svn: 134634
2011-07-07 20:25:10 +00:00
John McCall
23c29fea92
Change the IR-generation of VLAs so that we capture bounds,
...
not sizes; so that we use well-typed allocas; and so that we
properly recurse through the full set of variably-modified types.
llvm-svn: 133827
2011-06-24 21:55:10 +00:00
Daniel Dunbar
0de2faae4d
IRgen: Add CGOptions to CGTypes.
...
llvm-svn: 133530
2011-06-21 18:54:39 +00:00
Fariborz Jahanian
ab578bf355
llvm-gcc treats a tentative definition with a previous
...
(or follow up) extern declaration with weak_import as
an actual definition. make clang follows this behavior.
// rdar://9538608
llvm-gcc treats an extern declaration with weak_import
llvm-svn: 133450
2011-06-20 17:50:03 +00:00
Chris Lattner
e64d7ba153
Update to match mainline ConstantStruct::get API change. Also, use
...
ConvertType on InitListExprs as they are being converted. This is
needed for a forthcoming patch, and improves the IR generated anyway
(see additional type names in testcases).
This patch also converts a bunch of std::vector's in CGObjCMac to use
C arrays. There are a ton more that should be converted as well.
llvm-svn: 133413
2011-06-20 04:01:35 +00:00
Chris Lattner
845511fe1c
update for api change.
...
llvm-svn: 133365
2011-06-18 22:49:11 +00:00
Fariborz Jahanian
8feee2d169
Move computation of __private_extern__ visibilty to
...
getLVForNamespaceScopeDecl(). // rdar://9609649
llvm-svn: 133182
2011-06-16 20:14:50 +00:00
Fariborz Jahanian
a27070db0c
Set the visibility to 'hidden' when previous
...
declaration of global var is __private_extern__.
// rdar://9609649
llvm-svn: 133157
2011-06-16 14:49:42 +00:00
John McCall
31168b077c
Automatic Reference Counting.
...
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
2011-06-15 23:02:42 +00:00
Eli Friedman
300f55dcad
PR10120: Make CodeGenModule::getVTableLinkage use NamedDecl::getLinkage to determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates.
...
While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp.
llvm-svn: 132861
2011-06-10 21:53:06 +00:00
Douglas Gregor
0aa91e0a66
When inferring the result type of a block based on a return statement
...
with a type-dependent expression, infer the placeholder type
'Context.DependentTy' to indicate that this is just a
placeholder. Fixes PR9982 / <rdar://problem/9486685>.
llvm-svn: 132657
2011-06-05 05:04:23 +00:00
Eli Friedman
6ffb623a52
Match llvm-gcc's string literals alignment by forcing alignment on string literals to 1. This can significantly impact the size of the string data, and as far as I know, the alignment doesn't help performance. rdar://9078969 .
...
llvm-svn: 132223
2011-05-27 22:13:20 +00:00
Rafael Espindola
c1ee12c952
Update for llvm api change.
...
llvm-svn: 132034
2011-05-25 03:44:55 +00:00
Fariborz Jahanian
ccdfa39005
Code cleanup of my last patch.
...
llvm-svn: 131499
2011-05-17 22:46:11 +00:00
Fariborz Jahanian
7bd3d1c49b
Patch to fix IR-gen crash generating structure ABI which implements
...
user specified string class via -fconstant-string-class option.
pr9914.
llvm-svn: 131496
2011-05-17 22:21:16 +00:00
John McCall
9dc0db2192
Use arrays and SmallVectors instead of std::vectors when building function
...
types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t
alias. No functionality change.
llvm-svn: 131373
2011-05-15 01:53:33 +00:00
Joerg Sonnenberger
be7850dd8a
Simplify
...
llvm-svn: 131321
2011-05-13 22:58:37 +00:00
Joerg Sonnenberger
caf8ffd8e3
Bug 8765: Honor assembler labels for builtins. Ensure that the label is
...
mangled to avoid doing it twice for platforms that use prefixes like
Darwin.
llvm-svn: 131311
2011-05-13 21:12:10 +00:00
Fariborz Jahanian
a52b1f72ef
Produce UTF-8 strings with -fconstant-string-class
...
-fno-constant-cfstrings. Patch by Jonathan Schleifer.
llvm-svn: 131298
2011-05-13 18:13:10 +00:00
Douglas Gregor
61226d3fcf
When determining whether we can make a declaration into a global
...
constant, also consider whether it's a class type that has any mutable
fields. If so, it can't be a global constant.
llvm-svn: 131276
2011-05-13 01:05:07 +00:00
Douglas Gregor
2d1c055eba
In C++, allow us to emit a global as 'constant' even if it has class
...
type, so long as it is known to have a constant initializer and the
class type is a POD class. Fixes <rdar://problem/9306265>.
llvm-svn: 131060
2011-05-07 22:06:45 +00:00