Commit Graph

17142 Commits

Author SHA1 Message Date
Benjamin Kramer 87368acb2f Cast CachedLinkage to linkage to avoid "comparison between signed and unsigned integer" warnings.
llvm-svn: 121143
2010-12-07 15:51:48 +00:00
Douglas Gregor 4da9d68da0 Implement ASTImporter support for Objective-C category implementations.
llvm-svn: 121139
2010-12-07 15:32:12 +00:00
Rafael Espindola 0017c5fa92 Fix PR8720 by printing an error message with a substring that the gcc testsuite searches for.
llvm-svn: 121137
2010-12-07 15:23:23 +00:00
Jay Foad 6d4db0c885 PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

llvm-svn: 121121
2010-12-07 08:25:34 +00:00
Douglas Gregor da8025c09e Extern the ASTImporter to import @implementation declarations.
llvm-svn: 121097
2010-12-07 01:26:03 +00:00
Francois Pichet 347c4c7b8f Fix enumerator not handled in switch warnings.
llvm-svn: 121084
2010-12-07 00:55:57 +00:00
John McCall 6dd27195b9 Kill FullExpr, as it was not, in fact, used anywhere in the code base.
I'm not opposed to the idea in concept, but there's no point in preserving
abortive experiments.

llvm-svn: 121083
2010-12-07 00:47:33 +00:00
Douglas Gregor a40433a33a Use Sema::MaybeCreateExprWithCleanups() only after we've checked for a NULL/invalid expression
llvm-svn: 121081
2010-12-07 00:41:46 +00:00
Francois Pichet 9dfa3ce94f Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

llvm-svn: 121074
2010-12-07 00:08:36 +00:00
Douglas Gregor 9aeaa4d650 Use atomic operations for libclang's object count tracking.
llvm-svn: 121073
2010-12-07 00:05:48 +00:00
Douglas Gregor c6bd1d32bf Objective-C pointer conversions to 'id' or qualified 'id' subsume
cv-qualification conversions. More specifically, there's an implicit
cv-qualification conversion (even one that drops qualifiers) when
converting to 'id' or qualified 'id'. Fixes <rdar://problem/8734046>.

llvm-svn: 121047
2010-12-06 22:09:19 +00:00
John McCall 2758424d23 Split out a function to do lvalue conversion on objects; this is basically
FunctionArrayLvalueConversion but without the function/array decay.  Generally
this is only appropriate for use sites that know the type of the expression
and thus that it can't be subject to the decays.

Also make sure we do lvalue-to-rvalue on the bases of ivar references.

llvm-svn: 121035
2010-12-06 20:48:59 +00:00
Argyrios Kyrtzidis 7ddcb80efe Remove a fixme which was fixed in a previous commit.
llvm-svn: 121029
2010-12-06 19:36:50 +00:00
Douglas Gregor 91df6cf85e Use the unused merge() function, fixing an minor, unintended change I
introduced in r121023.

llvm-svn: 121025
2010-12-06 18:50:56 +00:00
Douglas Gregor bf62d647de Re-implement caching for the linkage calculation of declarations.
My previous attempt at solving the compile-time problem with many
redeclarations of the same entity cached both linkage and visibility,
while this patch only tackles linkage. There are several reasons for
this difference:

  - Linkage is a language concept, and is evaluated many times during
    semantic analysis and codegen, while visibility is only a
    code-generation concept that is evaluated only once per (unique)
    declaration. Hence, we *must* optimize linkage calculations but
    don't need to optimize visibility computation.
  - Once we know the linkage of a declaration, subsequent
    redeclarations can't change that linkage. Hence, cache
    invalidation is far simpler than for visibility, where a later
    redeclaration can completely change the visibility.
  - We have 3 spare bits in Decl to store the linkage cache, so the
    cache doesn't increase the size of declarations. With the
    visibility+linkage cache, NamedDecl got larger.

llvm-svn: 121023
2010-12-06 18:36:25 +00:00
John McCall 9bc2677b8c Do unary conversions on vararg arguments and *then* special-case float.
Fixes PR8742.

llvm-svn: 121022
2010-12-06 18:36:11 +00:00
Argyrios Kyrtzidis e88168ae6e Use Sema's MarkDeclarationReferenced, which takes care of templates, instead of calling Decl's setUsed directly.
Thanks to John for the hint!

llvm-svn: 121014
2010-12-06 17:51:53 +00:00
Argyrios Kyrtzidis 7b608976b1 Use the source location of the parameter, when it makes sense, for diagnostics in HandleCleanupAttr.
llvm-svn: 121013
2010-12-06 17:51:50 +00:00
Douglas Gregor 027ba500ab Revert r120808, my previous implementation of caching for the linkage
and visibility of declarations, because it was extremely messy and it
increased the size of NamedDecl.

An improved implementation is forthcoming.

llvm-svn: 121012
2010-12-06 17:49:01 +00:00
Fariborz Jahanian 1321cbbd87 Add BlocksAttr assert on __block specific
routines.

llvm-svn: 121007
2010-12-06 17:28:17 +00:00
Chandler Carruth d44c3105fb Un-templatetize this method. It's definition is out of line in the .cpp file,
so that's not a valid thing to do at all. Instead, switch to a ValueDecl
argument, the template isn't really necessary here.

When handling the types explicitly in the code, it becomes awkward to cerate
the CXXBaseOrMemberInitializer object in so many places. Re-flow the code to
calculate the Init expression first, and then create the initializer. If this
is too gross, we can factor the init expression logic into helper functions,
but it's not past my threshold yet.

llvm-svn: 120997
2010-12-06 09:23:57 +00:00
John McCall 5d41378146 Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.

llvm-svn: 120996
2010-12-06 08:20:24 +00:00
John McCall d0a300162e __block variables require us to evaluate the RHS of an assignment before
the LHS, or else the pointer might be invalid.  This is kindof dumb, but
go ahead and make sure we're doing that for l-value scalar assignment,
which fixes a miscompile of obj-c++.dg/block-seq.mm.

Leave a FIXME for how to solve this problem for agg __blocks.

llvm-svn: 120992
2010-12-06 06:10:02 +00:00
John McCall 622114cfe3 Clarify the logic for when to build an overloaded binop. In particular,
build one when either of the operands calls itself type-dependent;
previously we were building when one of the operand types was dependent,
which is not always the same thing and which can lead to unfortunate
inconsistencies later.  Fixes PR8739.

llvm-svn: 120990
2010-12-06 05:26:58 +00:00
Ted Kremenek f19a93dd99 Mark SVal constructors 'explicit'.
llvm-svn: 120970
2010-12-05 23:36:20 +00:00
Ted Kremenek 6a1cf6f77c Rename Environment::LookupExpr() to
Environment::lookupExpr() and move its implementation
out-of-line.

llvm-svn: 120969
2010-12-05 23:36:15 +00:00
John McCall a2342eb857 Fix a bug in the emission of __real/__imag l-values on scalar operands.
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.

llvm-svn: 120931
2010-12-05 02:00:02 +00:00
Anders Carlsson a518b2a5a1 Add a LayoutBase member function. No functionality change.
llvm-svn: 120924
2010-12-04 23:59:48 +00:00
Anders Carlsson d74cad80b0 Replace calls to AppendBytes with calls to AppendPadding when the bytes appended are padding.
llvm-svn: 120922
2010-12-04 23:53:18 +00:00
Fariborz Jahanian 83e7d5a90a Fix rewriter to match recent changes in property ref
AST.

llvm-svn: 120919
2010-12-04 21:22:13 +00:00
John McCall 594827281c Silly special case: never load when dereferencing void*.
llvm-svn: 120905
2010-12-04 12:43:24 +00:00
John McCall ca61b6567b First pass at implementing the intent of ANSI C DR106.
llvm-svn: 120904
2010-12-04 12:29:11 +00:00
John McCall a03eddad58 dyn_cast else unreachable -> cast
llvm-svn: 120902
2010-12-04 09:57:16 +00:00
Francois Pichet d583da04d0 More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list:
struct X {
  X() : au_i1(123) {}
  union {
    int au_i1;
    float au_f1;
  };
};

clang will now deal with au_i1 explicitly as an IndirectFieldDecl.

llvm-svn: 120900
2010-12-04 09:14:42 +00:00
John McCall 211e699754 Don't crash when initializing a subaggregate in C from a property r-value.
llvm-svn: 120899
2010-12-04 09:03:57 +00:00
John McCall 5a4ce8bf06 Make IgnoreParenLValueCasts skip __extension__ nodes like IgnoreParens().
Abramo noticed this.

llvm-svn: 120898
2010-12-04 08:24:19 +00:00
Benjamin Kramer b024166c97 Silence "comparison between signed and unsigned integer expressions" warnings.
llvm-svn: 120897
2010-12-04 08:16:05 +00:00
John McCall e26a872b02 Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn't
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.

llvm-svn: 120896
2010-12-04 08:14:53 +00:00
John McCall 29cb2fdbc1 When deciding whether to complain about the type of a boolean condition, use
the type of the expression *after* array/function decay.

llvm-svn: 120895
2010-12-04 06:09:13 +00:00
John McCall 34376a68c4 Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ.  So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.

In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.

This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.

Ted Kremenek kindly contributed the analyzer workarounds in this patch.

llvm-svn: 120890
2010-12-04 03:47:34 +00:00
John McCall 0692a32a3e Test case for the l-value base only being evaluated once.
Also, move the l-value emission code into CGObjC.cpp and teach it, for
completeness, to store away self for a super send.

Also, inline the super cases for property gets and sets and make them
use the correct result type for implicit getter/setter calls.

llvm-svn: 120887
2010-12-04 03:11:00 +00:00
John McCall f3eb96fccf Kill the KVC l-value kind and calculate the base expression when emitting
the l-value.

llvm-svn: 120884
2010-12-04 02:32:38 +00:00
Peter Collingbourne fafa66500b Implement -cl-std=
llvm-svn: 120882
2010-12-04 01:51:40 +00:00
Peter Collingbourne 422542625b Implement -cl-mad-enable
llvm-svn: 120881
2010-12-04 01:51:33 +00:00
Peter Collingbourne 61d6a75345 Implement -cl-fast-relaxed-math
llvm-svn: 120880
2010-12-04 01:51:23 +00:00
Peter Collingbourne b8d9995c0e Implement -cl-unsafe-math-optimizations
llvm-svn: 120879
2010-12-04 01:51:14 +00:00
Peter Collingbourne 0ba5ac8544 Implement -cl-finite-math-only
llvm-svn: 120878
2010-12-04 01:51:05 +00:00
Peter Collingbourne 0b69e1a628 Implement -cl-single-precision-constant
llvm-svn: 120877
2010-12-04 01:50:56 +00:00
Peter Collingbourne 31587c86c1 Implement -cl-opt-disable
llvm-svn: 120876
2010-12-04 01:50:45 +00:00
Peter Collingbourne b8e5dd44ed Refactor optimisation level code
llvm-svn: 120875
2010-12-04 01:50:36 +00:00
Peter Collingbourne aaeb73b159 Introduce CompilerInvocation::setLangDefaults function
This patch refactors the CompilerInvocation code to introduce a
CompilerInvocation::setLangDefaults function, which can set up a
LangOptions with the defaults for a given language and language
standard.  This function is useful for non-command line based Clang
clients which need to set up a CompilerInvocation manually for a
specific language.

llvm-svn: 120874
2010-12-04 01:50:27 +00:00
Argyrios Kyrtzidis d22d8ff343 Minor refactoring; have BugReport::getRanges return a pair of iterator, no functionality change.
llvm-svn: 120873
2010-12-04 01:12:15 +00:00
Argyrios Kyrtzidis 86a26b8e35 Mark functions referenced by 'cleanup' attribute as used. Fixes rdar://8728293
llvm-svn: 120872
2010-12-04 01:12:11 +00:00
Fariborz Jahanian ecbbb6e9ba Diagnose when accessing property in a class method and
no property accessor class method to be found, instead of
crashing in IRGen. // rdar://8703553

llvm-svn: 120855
2010-12-03 23:37:08 +00:00
Abramo Bagnara 21e9d860b5 Fixed typo.
llvm-svn: 120839
2010-12-03 21:39:42 +00:00
Abramo Bagnara 0e05e24e9c Added struct/class syntactic info for c++0x scoped enum.
llvm-svn: 120828
2010-12-03 18:54:17 +00:00
Bob Wilson 7795599f4b Add support for vmul_p8 Neon intrinsic. Radar 8446141.
llvm-svn: 120812
2010-12-03 17:29:39 +00:00
Douglas Gregor 17fed4c754 Implement caching for the linkage and visibility calculations of
declarations.

The motivation for this patch is that linkage/visibility computations
are linear in the number of redeclarations of an entity, and we've run
into a case where a single translation unit has > 6500 redeclarations
of the same (unused!) external variable. Since each redeclaration
involves a linkage check, the resulting quadratic behavior makes Clang
slow to a crawl. With this change, a simple test with 512
redeclarations of a variable syntax-checks ~20x faster than
before.

That said, I hate this change, and will probably end up reverting it
in a few hours. Reasons to hate it:
  - It makes NamedDecl larger, since we don't have enough free bits in
  Decl to squeeze in the extra information about caching.
  - There are way too many places where we need to invalidate this
  cache, because the visibility of a declaration can change due to
  redeclarations (!). Despite self-hosting and passing the testsuite,
  I have no confidence that I've found all of places where this cache
  needs to be invalidated.

llvm-svn: 120808
2010-12-03 17:11:42 +00:00
Bob Wilson 4fa993fc51 Add a separate rightShift flag instead of reusing the existing "poly" variable
to distinguish vsri/vsli.

llvm-svn: 120806
2010-12-03 17:10:22 +00:00
Eric Christopher 515d87ff95 Add some warning messages about invalid use of common/nocommon attributes.
llvm-svn: 120799
2010-12-03 06:58:14 +00:00
Ted Kremenek 48b430d789 Fix an insidious bug in BugReporter where
a node in the trimmed graph might not always
correctly map back to the original error node.
This could cause a crash in some cases when
flagging memory leaks.

llvm-svn: 120795
2010-12-03 06:52:30 +00:00
Ted Kremenek 57859c56c8 Also include the pointer address of the ExplodedNode
when generating DOT output for an ExplodedGraph.

llvm-svn: 120794
2010-12-03 06:52:26 +00:00
Argyrios Kyrtzidis 833be2ddd8 Also show notes about the taken path in TextPathDiagnostics.
llvm-svn: 120783
2010-12-03 02:03:26 +00:00
Argyrios Kyrtzidis 2fd03a60e4 Remove leftover code and use the text path diagnostic client even without a specified output file since
it just uses diagnostic notes.

llvm-svn: 120773
2010-12-03 01:17:19 +00:00
Argyrios Kyrtzidis c95e596728 Introduce TextPathDiagnostics, a simple PathDiagnosticClient that outputs as diagnostic notes
the sequence of events; useful for testing.

llvm-svn: 120770
2010-12-03 00:58:14 +00:00
Argyrios Kyrtzidis 7c0570e40f Handle any number of SourceRanges inside BugReporter::FlushReport.
llvm-svn: 120769
2010-12-03 00:58:10 +00:00
Argyrios Kyrtzidis c23f0e0a03 Rename Create[*]DiagnosticClient -> create[*]DiagnosticClient.
llvm-svn: 120768
2010-12-03 00:58:08 +00:00
Ted Kremenek 8c4c74f4fb Fix diagnostic for reporting bad escape sequence.
Patch by Paul Curtis!

llvm-svn: 120759
2010-12-03 00:09:56 +00:00
Chris Lattner 5cd8475564 Reflow to a style doug prefers, increasing indentation :-)
llvm-svn: 120746
2010-12-02 22:52:04 +00:00
Douglas Gregor 6dd3a6a181 When we're performing an explicit cast of some sort, don't complain
about deprecated Objective-C pointer conversions. Plus, make sure to
actually set an appropriate AssignmentAction when performing an
implicit conversion from an InitializationSequence. Fixes regressions
in the GCC DejaGNU testsuite.

llvm-svn: 120744
2010-12-02 21:47:04 +00:00
Peter Collingbourne 19b961d5f9 Merge transparent union types using member's unqualified type
llvm-svn: 120736
2010-12-02 21:00:06 +00:00
Ted Kremenek 9e618ed1c9 Fix range in printf warnings for invalid conversion specifiers.
llvm-svn: 120735
2010-12-02 20:57:51 +00:00
Peter Collingbourne 102ad54099 Merge transparent union types using member's canonical param type
llvm-svn: 120729
2010-12-02 20:02:29 +00:00
Douglas Gregor 96303ea853 Fix inverted return value in the ASTImporter. No matter how much LLVM
code I wrote, returning "true" on error is still unnatural.

llvm-svn: 120727
2010-12-02 19:33:37 +00:00
Abramo Bagnara e0acd859d0 Fixed source range for MS asm statement.
llvm-svn: 120724
2010-12-02 18:34:55 +00:00
Chris Lattner c5cc2fb980 fix PR8726 by teaching the aggregate init optimization code to handle
structs with references in them correctly.

llvm-svn: 120722
2010-12-02 18:29:00 +00:00
Fariborz Jahanian 50198098b9 IR Gen. part of API support for __block cxx
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).

llvm-svn: 120713
2010-12-02 17:02:11 +00:00
Douglas Gregor 2da6670ef0 Do not change the size of LookupResult::Filter based on the NDEBUG
macri; the extra bool fits into padding anyway.

llvm-svn: 120708
2010-12-02 16:19:31 +00:00
John McCall 9af3787244 Tweaks.
llvm-svn: 120701
2010-12-02 10:37:08 +00:00
John McCall 064289c84c ObjC support in the XML dumper.
llvm-svn: 120700
2010-12-02 10:24:56 +00:00
Ted Kremenek 90af90967a Merge ValueManager into SValBuilder.
llvm-svn: 120696
2010-12-02 07:49:45 +00:00
Chris Lattner 27a3631bac Improve codegen for initializer lists to use memset more aggressively
when an initializer is variable (I handled the constant case in a previous
patch).  This has three pieces:

1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that
   the memory being stored into has previously been memset to zero.
2. Teach CGExprAgg to not emit stores of zero to isZeroed memory.
3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine
   whether they are profitable to emit a memset + inividual stores vs
   stores for everything.

The heuristic used is that a global has to be more than 16 bytes and
has to be 3/4 zero to be candidate for this xform.  The two testcases
are illustrative of the scenarios this catches.  We now codegen test9 into:

 call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false)
 %.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0
 %tmp = load i32* %X.addr, align 4
 store i32 %tmp, i32* %.array

and test10 into:

  call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false)
  %tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0
  %tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0
  %tmp2 = load i32* %X.addr, align 4
  store i32 %tmp2, i32* %tmp1, align 4
  %tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3
  %tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4
  %tmp11 = load i32* %X.addr, align 4
  store i32 %tmp11, i32* %tmp10, align 4

Previously we produced 99 stores of zero for test9 and also tons for test10.
This xforms should substantially speed up -O0 builds when it kicks in as well
as reducing code size and optimizer heartburn on insane cases.  This resolves
PR279.

llvm-svn: 120692
2010-12-02 07:07:26 +00:00
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
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 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
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
Peter Collingbourne 546d0795f3 Serialization: support for CUDA language extensions
llvm-svn: 120588
2010-12-01 19:14:57 +00:00