Commit Graph

27112 Commits

Author SHA1 Message Date
Chris Lattner 4fc8fb09d0 attempt to fix a buildbot failure, apparently apache fails to build.
llvm-svn: 120688
2010-12-02 04:27:29 +00:00
Eric Christopher 8a2ee390be Add support for the common and nocommon attributes.
rdar://8560647

llvm-svn: 120650
2010-12-02 02:45:55 +00:00
Eric Christopher c629a5c7d0 FileCheckize.
llvm-svn: 120648
2010-12-02 02:30:43 +00:00
Eric Christopher 690c2d1ed6 FileCheckize.
llvm-svn: 120647
2010-12-02 02:13:27 +00:00
John McCall fee942d150 Perform lvalue-to-rvalue at the end of an expression statement in C.
llvm-svn: 120646
2010-12-02 02:07:15 +00:00
Chris Lattner e6af88628f Enhance the init generation logic to emit a memset followed by a few stores when
a global is larger than 32 bytes and has fewer than 6 non-zero values in the
initializer.  Previously we'd turn something like this:

char test8(int X) {
  char str[10000] = "abc";

into a 10K global variable which we then memcpy'd from.  Now we generate:

  %str = alloca [10000 x i8], align 16
  %tmp = getelementptr inbounds [10000 x i8]* %str, i64 0, i64 0
  call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 10000, i32 16, i1 false)
  store i8 97, i8* %tmp, align 16
  %0 = getelementptr [10000 x i8]* %str, i64 0, i64 1
  store i8 98, i8* %0, align 1
  %1 = getelementptr [10000 x i8]* %str, i64 0, i64 2
  store i8 99, i8* %1, align 2

Which is much smaller in space and also likely faster.

This is part of PR279

llvm-svn: 120645
2010-12-02 01:58:41 +00:00
John McCall b7bd14fa08 Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.

llvm-svn: 120643
2010-12-02 01:19:52 +00:00
Bob Wilson 13e3b00e76 Test use of arm_neon.h with -fno-lax-vector-conversions.
llvm-svn: 120642
2010-12-02 01:18:30 +00:00
Bob Wilson 5ceace4d14 Add a testcase for Radar 8228022.
Make sure the -Wvector-conversions does not cause unnecessary warnings when
using Neon intrinsics with the correct types.

llvm-svn: 120634
2010-12-02 00:25:18 +00:00
Bob Wilson 01856f38c2 Swap order of checking for compatible vector types.
Check for compatible gcc, Altivec and Neon vectors before handling the
lax-vector-conversions case.  Otherwise there is no way to avoid the
warnings from -Wvector-conversions.

llvm-svn: 120633
2010-12-02 00:25:15 +00:00
Douglas Gregor 4b00d3b55a Eliminate two uses of NDEBUG in headers that cause different symbols
to be available in debug vs. release builds.

llvm-svn: 120629
2010-12-02 00:22:25 +00:00
Douglas Gregor 451d1b1d27 Make TypeLocBuilder an implementation detail of Sema. Nobody else should be using it
llvm-svn: 120628
2010-12-02 00:05:49 +00:00
Douglas Gregor 73693023f0 Extend ExternalASTSource with the ability to lazily complete the
definition of an Objective-C class. Unlike with C/C++ classes, we
don't have a well-defined point in Sema where Objective-C classes are
checked for completeness, nor do we need to involve Sema when
completing a class. Therefore, we take the appropriate of having the
external AST source mark a particular Objective-C class as having an
external declaration; when using one of the accessors of an
Objective-C class that has an external declaration, we request that
the external AST source fill in the Objective-C class definition.

llvm-svn: 120627
2010-12-01 23:49:52 +00:00
Fariborz Jahanian 7cfe7679aa Sema/AST work for capturing copy init expression
to be used in copy helper synthesis of __block
variables. wip.

llvm-svn: 120617
2010-12-01 22:29:46 +00:00
Ted Kremenek c5bea1e337 Rename all 'AssumeXXX' methods in libChecker
to 'assumeXXX'.

llvm-svn: 120614
2010-12-01 22:16:56 +00:00
Eric Christopher bc638a83e0 80-col fixups.
llvm-svn: 120613
2010-12-01 22:13:54 +00:00
Anton Yartsev b9734cd4eb Optimized IR for vec_splat
llvm-svn: 120610
2010-12-01 21:59:31 +00:00
Ted Kremenek dc891429e4 Rename all 'EvalXXX' methods in libChecker to
'evalXXX'.

llvm-svn: 120609
2010-12-01 21:57:22 +00:00
Douglas Gregor 8d6d06761f Improve our handling of cv-qualifiers in Objective-C pointer
conversions. Previously, we would end up collapsing qualification
conversions into the Objective-C pointer conversion step, including
(possibly) stripping qualifiers that shouldn't be removed.

This generalizes BuildSimilarlyQualifiedPointerType() to also work on
Objective-C object pointers, then eliminates the (redundant, not
totally correct) BuildSimilarlyQualifiedObjCObjectPointerType()
function.

Fixes <rdar://problem/8714395>.

llvm-svn: 120607
2010-12-01 21:43:58 +00:00
Ted Kremenek 9d0bb1e366 Rename 'SValuator' to 'SValBuilder'. The new name
reflects what the class actually does.

llvm-svn: 120605
2010-12-01 21:28:31 +00:00
Shantonu Sen 8283f1551a Fix build of in-tree libcxx. libcxx doesn't actually
need any of the LLVM support libraries. Reviewed
by Daniel Dunbar.

llvm-svn: 120602
2010-12-01 20:38:11 +00:00
Douglas Gregor aa49ecc458 Not content to implement just "extern" explicit template
instantiations, GCC also supports "inline" and "static" explicit
template instantiations. Parse and warn about such constructs, but
don't implement the semantics of either "inline" or "static". They
don't seem to be widely used.

llvm-svn: 120599
2010-12-01 20:32:20 +00:00
Bob Wilson 67056b613d Add some comments.
llvm-svn: 120598
2010-12-01 19:50:20 +00:00
Peter Collingbourne 546d0795f3 Serialization: support for CUDA language extensions
llvm-svn: 120588
2010-12-01 19:14:57 +00:00
Douglas Gregor d1f69f6a1d After parsing a ':' in an enum-specifier within class context,
disambiguate between an expression (for a bit-field width) and a type
(for a fixed underlying type). Since the disambiguation can be
expensive (due to tentative parsing), we perform a simplistic
disambiguation based on one-token lookahead before going into the
full-blown tentative parsing. Based on a patch by Daniel Wallin.

llvm-svn: 120582
2010-12-01 17:42:47 +00:00
Douglas Gregor 1a099ba4db Improve the diagnostic when the fixed underlying type of a
redeclaration of an enum type differs from that of the original
declaration, from Daniel Wallin

llvm-svn: 120577
2010-12-01 16:10:38 +00:00
Douglas Gregor ec0e366163 AST printing for scoped enumerations and enumerations with a fixed underlying type, from Daniel Wallin
llvm-svn: 120576
2010-12-01 16:01:08 +00:00
John McCall 669a31d6f7 Eliminate vtables from the Type hierarchy.
llvm-svn: 120562
2010-12-01 08:12:46 +00:00
John McCall f3735e01ce Restore the lvalue-to-rvalue conversion patch with a minimal fix.
llvm-svn: 120555
2010-12-01 04:43:34 +00:00
Nick Lewycky c7a020af87 Remove stray emacs mode marker.
llvm-svn: 120554
2010-12-01 04:33:27 +00:00
Peter Collingbourne 8f6218bfa0 test: add .cu extension
llvm-svn: 120553
2010-12-01 04:22:41 +00:00
Peter Collingbourne 6ab610ce57 Basic, Sema: add support for CUDA location attributes
llvm-svn: 120545
2010-12-01 03:15:31 +00:00
Peter Collingbourne 62089b82bb Driver, Frontend: add CUDA language support
llvm-svn: 120544
2010-12-01 03:15:20 +00:00
Peter Collingbourne 07525a0726 Basic: Add CUDA language option
llvm-svn: 120543
2010-12-01 03:15:10 +00:00
Dan Gohman b16def2be9 Don't check the isysroot path for Path::isValid(); if the user has
specified a syntactically invalid path, it's better to let the OS
diagnose the problem than to silently skip it.

llvm-svn: 120542
2010-12-01 02:59:44 +00:00
Chris Lattner b85025fedd add some infrastructure that will let us codegen
http://llvm.org/bugs/show_bug.cgi?id=279#c3 better.

No functionality change yet.

llvm-svn: 120530
2010-12-01 02:05:19 +00:00
Rafael Espindola 81937ec1b6 Handle -nostartfiles.
llvm-svn: 120528
2010-12-01 01:52:43 +00:00
Chris Lattner 46a7ad7605 get some i32/i8/i1 constants from Builder, which is much less painful than
using ConstantInt::get.

llvm-svn: 120527
2010-12-01 01:47:15 +00:00
Douglas Gregor e2e50d331c Implement AST import support for class template specializations.
llvm-svn: 120523
2010-12-01 01:36:18 +00:00
Fariborz Jahanian 68500913ec When unknown method is sent to a receiver of
'Class' type, disgnostic should refere to a
class method. Fixes // rdar://8592156

llvm-svn: 120517
2010-12-01 01:07:24 +00:00
John McCall 5a39bd2443 A CGRecordLayout object persists. Since its contained types may
refer to opaque types, they must be held via PATypeHolders.  I'm
not sure why this hasn't blown up before.

llvm-svn: 120491
2010-11-30 23:21:46 +00:00
John McCall bcd38217f3 CGRecordLayoutBuilder does not need to be exported from this module.
llvm-svn: 120489
2010-11-30 23:17:27 +00:00
Ted Kremenek b360ae4ec5 Update checker build.
llvm-svn: 120487
2010-11-30 23:08:24 +00:00
Fariborz Jahanian 3a4ea9a76c Declaring local static in global block
literal declaration caused crash in CodeGen.
This patch fixes it. pr8707

llvm-svn: 120486
2010-11-30 23:07:14 +00:00
Argyrios Kyrtzidis e72f7154f1 Follow through references to catch returned stack addresses, local blocks, label addresses or references to temporaries, e.g:
const int& g2() {
  int s1;
  int &s2 = s1; // expected-note {{binding reference variable 's2' here}}
  return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}}
}

llvm-svn: 120483
2010-11-30 22:57:32 +00:00
Douglas Gregor a082a49d9e Implement basic AST importing and merging support for class template
declarations.

llvm-svn: 120448
2010-11-30 19:14:50 +00:00
Douglas Gregor 5d02a7e553 Eliminate more pointless default statements
llvm-svn: 120446
2010-11-30 19:14:03 +00:00
Fariborz Jahanian 1fdbaa84aa Add objc_getClass as an objc builtin function
(// rdar://8592641). Also rename LANGUAGEID to
LanguageID.

llvm-svn: 120437
2010-11-30 18:25:34 +00:00
John McCall 4f22c9de48 L-value to r-value conversion is not ready for prime-time.
llvm-svn: 120433
2010-11-30 17:58:55 +00:00
Fariborz Jahanian e8473c2feb Such function decls,as objc's objc_msgSend, builtins in
a specific language. We are adding such language info. by
extensing Builtins.def and via a language flag added
to LIBBUILTIN/BUILTIN and check for that when deciding
a name is builtin or not. Implements //rdar://8689273.

llvm-svn: 120429
2010-11-30 17:35:24 +00:00