]> granicus.if.org Git - clang/log
clang
14 years agoImplement dependency analysis for the precompiled preamble. If any of
Douglas Gregor [Sat, 31 Jul 2010 00:40:00 +0000 (00:40 +0000)]
Implement dependency analysis for the precompiled preamble. If any of
the files in the precompiled preamble have changed since it was build,
force the preamble to be rebuilt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109937 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate checker build.
Ted Kremenek [Fri, 30 Jul 2010 23:07:20 +0000 (23:07 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109907 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest case for PR7763.
Tom Care [Fri, 30 Jul 2010 21:42:31 +0000 (21:42 +0000)]
Test case for PR7763.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109895 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUncomment unfinished work bailout in IdempotentOperationsChecker.
Tom Care [Fri, 30 Jul 2010 21:14:15 +0000 (21:14 +0000)]
Uncomment unfinished work bailout in IdempotentOperationsChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109893 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd some timers to ASTUnit that are only enabled when the LIBCLANG_TIMING environment...
Douglas Gregor [Fri, 30 Jul 2010 20:58:08 +0000 (20:58 +0000)]
Add some timers to ASTUnit that are only enabled when the LIBCLANG_TIMING environment variable is set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109890 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCorrectly deal with using names for both functions and structs in chained PCH.
Sebastian Redl [Fri, 30 Jul 2010 17:25:10 +0000 (17:25 +0000)]
Correctly deal with using names for both functions and structs in chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109871 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd specialisation iterators for {Class,Function}TemplateDecl
Peter Collingbourne [Fri, 30 Jul 2010 17:09:11 +0000 (17:09 +0000)]
Add specialisation iterators for {Class,Function}TemplateDecl

This patch introduces the ClassTemplateDecl::spec_{begin,end}()
and FunctionTemplateDecl::{,partial_}spec_{begin,end}() member
functions as a public interface for iterating over the declarations'
specialisation sets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109870 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor find*Specialization functions using SpecEntryTraits
Peter Collingbourne [Fri, 30 Jul 2010 17:09:04 +0000 (17:09 +0000)]
Refactor find*Specialization functions using SpecEntryTraits

This patch reimplements the find*Specialization family of member
functions of {Class,Function}TemplateDecl in terms of a common
implementation that uses SpecEntryTraits to obtain the most recent
declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109869 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIntroduce RedeclarableTemplateDecl::SpecEntryTraits
Peter Collingbourne [Fri, 30 Jul 2010 17:08:56 +0000 (17:08 +0000)]
Introduce RedeclarableTemplateDecl::SpecEntryTraits

SpecEntryTraits describes how to obtain the most recent declaration
of a specialisation from an entry in a specialisation FoldingSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109868 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSafely get a data pointer for vectors that might be empty.
Sebastian Redl [Fri, 30 Jul 2010 17:03:48 +0000 (17:03 +0000)]
Safely get a data pointer for vectors that might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109867 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTighten the rules when deciding if an ivar must be
Fariborz Jahanian [Fri, 30 Jul 2010 16:59:05 +0000 (16:59 +0000)]
Tighten the rules when deciding if an ivar must be
auto-synthesized (nonfragile-abi2 specific).
Fixes radar 8251648.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109866 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed typedef inside extern "C".
Abramo Bagnara [Fri, 30 Jul 2010 16:47:02 +0000 (16:47 +0000)]
Fixed typedef inside extern "C".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109865 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotests: Use env instead of assuming bash.
Daniel Dunbar [Fri, 30 Jul 2010 16:40:29 +0000 (16:40 +0000)]
tests: Use env instead of assuming bash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109864 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate checker build.
Ted Kremenek [Fri, 30 Jul 2010 16:27:57 +0000 (16:27 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109862 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen we are deserializing the lexical decls of a DeclContext from PCH, notify the...
Argyrios Kyrtzidis [Fri, 30 Jul 2010 10:03:23 +0000 (10:03 +0000)]
When we are deserializing the lexical decls of a DeclContext from PCH, notify the PCHReader to hold off passing Decls
to the consumer until the DeclContext is fully prepared.

Before, due to recursive loading, we could be in a situation where we would try to deserialize the decls of a DeclContext which was already doing that, and bad things would happen. In the specific case I encountered, the lexical decls would
form a cycle and we would enter infinite loop territory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109857 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor the way PCHReader tracks whether we are in recursive loading.
Argyrios Kyrtzidis [Fri, 30 Jul 2010 10:03:16 +0000 (10:03 +0000)]
Refactor the way PCHReader tracks whether we are in recursive loading.

-Replace CurrentlyLoadingTypeOrDecl with a counting scheme (NumCurrentElementsDeserializing)
-Provide outside access to the mechanism by adding methods StartedDeserializing/FinishedDeserializing
  to ExternalASTSource.

These are preparation for the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109856 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove error recovery when presented with an ill-formed template-id
John McCall [Fri, 30 Jul 2010 06:26:29 +0000 (06:26 +0000)]
Improve error recovery when presented with an ill-formed template-id
(e.g. due to a broken template argument) following template parameters.

Fixes rdar://problem/8254267

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109853 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIf a TST_typename has a null type, mark the declarator invalid. Prevents
John McCall [Fri, 30 Jul 2010 05:17:22 +0000 (05:17 +0000)]
If a TST_typename has a null type, mark the declarator invalid.  Prevents
some downstream crashes, among them rdar://problem/8229840.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109850 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEmit global destructors even if the destroyed object has no initializers or has
John McCall [Fri, 30 Jul 2010 04:56:58 +0000 (04:56 +0000)]
Emit global destructors even if the destroyed object has no initializers or has
an initializer requiring temporary object disposal.

Fixes rdar:://problem/8246444.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109849 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix PR5179 and correctly fix PR5831 to not miscompile.
Chris Lattner [Fri, 30 Jul 2010 04:02:24 +0000 (04:02 +0000)]
fix PR5179 and correctly fix PR5831 to not miscompile.

The X86-64 ABI code didn't handle the case when a struct
would get classified and turn up as "NoClass INTEGER" for
example.  This is perfectly possible when the first slot
is all padding (e.g. due to empty base classes).  In this
situation, the first 8-byte doesn't take a register at all,
only the second 8-byte does.

This fixes this by enhancing the x86-64 abi stuff to allow
and handle this case, reverts the broken fix for PR5831,
and enhances the target independent stuff to be able to
handle an argument value in registers being accessed at an
offset from the memory value.

This is the last x86-64 calling convention related miscompile
that I'm aware of.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109848 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThere is no reason for this test to invoke 'llc'.
Daniel Dunbar [Fri, 30 Jul 2010 03:30:55 +0000 (03:30 +0000)]
There is no reason for this test to invoke 'llc'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109847 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd test case for crash reported in <rdar://problem/8236270> (which has since been...
Ted Kremenek [Fri, 30 Jul 2010 01:10:48 +0000 (01:10 +0000)]
Add test case for crash reported in <rdar://problem/8236270> (which has since been fixed in trunk).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109834 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't print out ivars twice in Decl::print(). Fixes <rdar://problem/8253668>.
Ted Kremenek [Fri, 30 Jul 2010 00:47:46 +0000 (00:47 +0000)]
Don't print out ivars twice in Decl::print().  Fixes <rdar://problem/8253668>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109833 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake macro weirdness in chained PCH work. This required changing the way PCHReader...
Sebastian Redl [Fri, 30 Jul 2010 00:29:29 +0000 (00:29 +0000)]
Make macro weirdness in chained PCH work. This required changing the way PCHReader and PCHWriter are initialized to correctly pick up all initializer. On the upside, this means that there is far less repetition in the dependent PCH now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109823 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd clang_isPODType() for querying if the CXType is POD. Implements <rdar://problem...
Ted Kremenek [Fri, 30 Jul 2010 00:14:11 +0000 (00:14 +0000)]
Add clang_isPODType() for querying if the CXType is POD.  Implements <rdar://problem/8250669>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109822 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert "Re-apply fixed version of 108749, correctly conditionalizing the new
Daniel Dunbar [Thu, 29 Jul 2010 22:57:21 +0000 (22:57 +0000)]
Revert "Re-apply fixed version of 108749, correctly conditionalizing the new
sections on", this change uncovered a possible linker bug which resulted in the
wrong messages getting dispatched. Backing this out while we investigate...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109817 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: Clang test targets depend on the {FileCheck,not,count} tools.
Daniel Dunbar [Thu, 29 Jul 2010 22:57:17 +0000 (22:57 +0000)]
CMake: Clang test targets depend on the {FileCheck,not,count} tools.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109816 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.
Nate Begeman [Thu, 29 Jul 2010 22:48:34 +0000 (22:48 +0000)]
Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach isIncompleteType() to look through sugar when it is dealing with
Douglas Gregor [Thu, 29 Jul 2010 22:17:04 +0000 (22:17 +0000)]
Teach isIncompleteType() to look through sugar when it is dealing with
Objective-C object and interface types. This is part of PR7741.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109808 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove the last hunk of getCoerceResult into the place
Chris Lattner [Thu, 29 Jul 2010 21:42:50 +0000 (21:42 +0000)]
move the last hunk of getCoerceResult into the place
that needs it and remove getCoerceResult.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109807 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonow that direct and coerce are merged, getCoerceResult gets simpler.
Chris Lattner [Thu, 29 Jul 2010 21:29:53 +0000 (21:29 +0000)]
now that direct and coerce are merged, getCoerceResult gets simpler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109805 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonow that GetSSETypeAtOffset handles passing SSE class values as
Chris Lattner [Thu, 29 Jul 2010 21:22:50 +0000 (21:22 +0000)]
now that GetSSETypeAtOffset handles passing SSE class values as
float, the special case hack in getCoerceResult can go away.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109804 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange the name to something less terrible; suggestion by Doug. No functionality...
Argyrios Kyrtzidis [Thu, 29 Jul 2010 20:08:05 +0000 (20:08 +0000)]
Change the name to something less terrible; suggestion by Doug. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109797 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWeak references and variables that are not definitions are not required for early...
Argyrios Kyrtzidis [Thu, 29 Jul 2010 20:07:52 +0000 (20:07 +0000)]
Weak references and variables that are not definitions are not required for early codegen/deserialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109796 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement the clang-side of detection for when to pass as
Chris Lattner [Thu, 29 Jul 2010 18:39:32 +0000 (18:39 +0000)]
Implement the clang-side of detection for when to pass as
<2 x float> instead of double.  This works but can't be turned
on until I teach codegen to pass <2 x float> as one XMM register
instead of two.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109790 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLook at me, I can count!
Chris Lattner [Thu, 29 Jul 2010 18:19:50 +0000 (18:19 +0000)]
Look at me, I can count!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109786 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement PCH support for offsetof(base-specifier).
Argyrios Kyrtzidis [Thu, 29 Jul 2010 18:16:10 +0000 (18:16 +0000)]
Implement PCH support for offsetof(base-specifier).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109785 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMerge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into...
Argyrios Kyrtzidis [Thu, 29 Jul 2010 18:15:58 +0000 (18:15 +0000)]
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl
needs to be deserialized during PCH loading for codegen purposes.
Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext,
thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen.

This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109784 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix rdar://8251384, another case where we could access beyond the
Chris Lattner [Thu, 29 Jul 2010 18:13:09 +0000 (18:13 +0000)]
fix rdar://8251384, another case where we could access beyond the
end of a struct.  This improves the case when the struct being passed
contains 3 floats, either due to a struct or array of 3 things.  Before
we'd generate this IR for the testcase:

define float @bar(double %X.coerce0, double %X.coerce1) nounwind {
entry:
  %X = alloca %struct.foof, align 8               ; <%struct.foof*> [#uses=2]
  %0 = bitcast %struct.foof* %X to %1*            ; <%1*> [#uses=2]
  %1 = getelementptr %1* %0, i32 0, i32 0         ; <double*> [#uses=1]
  store double %X.coerce0, double* %1
  %2 = getelementptr %1* %0, i32 0, i32 1         ; <double*> [#uses=1]
  store double %X.coerce1, double* %2
  %tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
  %tmp1 = load float* %tmp                        ; <float> [#uses=1]
  ret float %tmp1
}

which compiled (with optimization) to:

_bar:                                   ## @bar
## BB#0:                                ## %entry
movd %xmm1, %rax
movd %eax, %xmm0
ret

Now we produce:

define float @bar(double %X.coerce0, float %X.coerce1) nounwind {
entry:
  %X = alloca %struct.foof, align 8               ; <%struct.foof*> [#uses=2]
  %0 = bitcast %struct.foof* %X to %0*            ; <%0*> [#uses=2]
  %1 = getelementptr %0* %0, i32 0, i32 0         ; <double*> [#uses=1]
  store double %X.coerce0, double* %1
  %2 = getelementptr %0* %0, i32 0, i32 1         ; <float*> [#uses=1]
  store float %X.coerce1, float* %2
  %tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
  %tmp1 = load float* %tmp                        ; <float> [#uses=1]
  ret float %tmp1
}

and:

_bar:                                   ## @bar
## BB#0:                                ## %entry
movaps %xmm1, %xmm0
ret

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109776 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd codegen support for ARM qadd & qsub intrinsics
Nate Begeman [Thu, 29 Jul 2010 17:57:17 +0000 (17:57 +0000)]
Add codegen support for ARM qadd & qsub intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109771 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agostart setting up infrastructure for passing multi-floats
Chris Lattner [Thu, 29 Jul 2010 17:49:08 +0000 (17:49 +0000)]
start setting up infrastructure for passing multi-floats
as <2 x float> instead of as double.  The backend isn't ready
yet, but infrastructure in the frontend can come up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109768 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPrepare for upcoming ownership change.
Benjamin Kramer [Thu, 29 Jul 2010 17:48:03 +0000 (17:48 +0000)]
Prepare for upcoming ownership change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109766 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename Get8ByteTypeAtOffset -> GetINTEGERTypeAtOffset to
Chris Lattner [Thu, 29 Jul 2010 17:40:35 +0000 (17:40 +0000)]
rename Get8ByteTypeAtOffset -> GetINTEGERTypeAtOffset to
make it clear that this function should only return a type
that the codegen will classify the same as an INTEGER type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109763 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agohandle a case where we could access off the end of a function
Chris Lattner [Thu, 29 Jul 2010 17:34:39 +0000 (17:34 +0000)]
handle a case where we could access off the end of a function
that Eli pointed out, rdar://8249586

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109762 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoin release mode, irbuilder doesn't add names to instructions,
Chris Lattner [Thu, 29 Jul 2010 17:14:05 +0000 (17:14 +0000)]
in release mode, irbuilder doesn't add names to instructions,
this will hopefully fix the osuosl clang-i686-darwin10 builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109760 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix PR7742 / rdar://8250764, a miscompilation of struct
Chris Lattner [Thu, 29 Jul 2010 17:04:54 +0000 (17:04 +0000)]
fix PR7742 / rdar://8250764, a miscompilation of struct
return where the struct has a base but no fields.  This
was because the x86-64 abi logic was checking the wrong
predicate in one place.

This was introduced in r91874, which was a fix for PR5831,
which lacked a CHECK line, so I verified and added it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109759 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTigthen the condition for issung ivar shadowing
Fariborz Jahanian [Thu, 29 Jul 2010 16:53:53 +0000 (16:53 +0000)]
Tigthen the condition for issung ivar shadowing
variables to those in file scope (nonfragile-abi2).
Fixes radar 8248681.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109758 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen dynamic_cast'ing from a type to itself, fill in the cast kind
Douglas Gregor [Thu, 29 Jul 2010 16:12:45 +0000 (16:12 +0000)]
When dynamic_cast'ing from a type to itself, fill in the cast kind
with CK_NoOp. Fixes PR7727.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109757 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement RedeclarableTemplateDecl::getNextRedeclaration
Peter Collingbourne [Thu, 29 Jul 2010 16:12:09 +0000 (16:12 +0000)]
Implement RedeclarableTemplateDecl::getNextRedeclaration

This patch uses the newly added Latest field of CommonBase to provide
a getNextRedeclaration() implementation for RedeclarableTemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109756 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoStore latest redeclaration for each redeclarable template declaration
Peter Collingbourne [Thu, 29 Jul 2010 16:12:01 +0000 (16:12 +0000)]
Store latest redeclaration for each redeclarable template declaration

This patch adds a Latest field to RedeclarableTemplateDecl's CommonBase
class which is used to store the latest redeclaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109755 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor redeclarable template declarations
Peter Collingbourne [Thu, 29 Jul 2010 16:11:51 +0000 (16:11 +0000)]
Refactor redeclarable template declarations

This patch refactors much of the common code in ClassTemplateDecl and
FunctionTemplateDecl into a common base class RedeclarableTemplateDecl
together with support functions in a template class RedeclarableTemplate.

The patch also includes similar refactoring for these classes' PCH
reader and writer implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109754 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen taking the address of a value of Objective-C object type (e.g.,
Douglas Gregor [Thu, 29 Jul 2010 16:05:45 +0000 (16:05 +0000)]
When taking the address of a value of Objective-C object type (e.g.,
one because we're referencing a variable of type NSString &), the
resulting type is an ObjCObjectPointerType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109753 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllow a looser form of compatibility checking (which ignores
Douglas Gregor [Thu, 29 Jul 2010 15:18:02 +0000 (15:18 +0000)]
Allow a looser form of compatibility checking (which ignores
qualifiers) when checking a K&R function definition against a previous
prototype. Fixes <rdar://problem/8193107>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109751 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen deleting a value of class type, make sure that type is complete
Douglas Gregor [Thu, 29 Jul 2010 14:44:35 +0000 (14:44 +0000)]
When deleting a value of class type, make sure that type is complete
before looking for conversions to pointer type. Fixes <rdar://problem/8248780>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109749 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReword the empty struct/union warning in C to note that such structs and unions have...
Douglas Gregor [Thu, 29 Jul 2010 14:29:34 +0000 (14:29 +0000)]
Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, size 1 in C++. Put this warning under -Wc++-compat.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109748 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThis is a little bit far, but optimize cases like:
Chris Lattner [Thu, 29 Jul 2010 07:43:55 +0000 (07:43 +0000)]
This is a little bit far, but optimize cases like:

struct a {
  struct c {
    double x;
    int y;
  } x[1];
};

void foo(struct a A) {
}

into:

define void @foo(double %A.coerce0, i32 %A.coerce1) nounwind {
entry:
  %A = alloca %struct.a, align 8                  ; <%struct.a*> [#uses=1]
  %0 = bitcast %struct.a* %A to %struct.c*        ; <%struct.c*> [#uses=2]
  %1 = getelementptr %struct.c* %0, i32 0, i32 0  ; <double*> [#uses=1]
  store double %A.coerce0, double* %1
  %2 = getelementptr %struct.c* %0, i32 0, i32 1  ; <i32*> [#uses=1]
  store i32 %A.coerce1, i32* %2

instead of:

define void @foo(double %A.coerce0, i64 %A.coerce1) nounwind {
entry:
  %A = alloca %struct.a, align 8                  ; <%struct.a*> [#uses=1]
  %0 = bitcast %struct.a* %A to %0*               ; <%0*> [#uses=2]
  %1 = getelementptr %0* %0, i32 0, i32 0         ; <double*> [#uses=1]
  store double %A.coerce0, double* %1
  %2 = getelementptr %0* %0, i32 0, i32 1         ; <i64*> [#uses=1]
  store i64 %A.coerce1, i64* %2

I only do this now because I never want to look at this code again :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109738 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement a todo: pass a eight-byte that consists of a
Chris Lattner [Thu, 29 Jul 2010 07:30:00 +0000 (07:30 +0000)]
implement a todo: pass a eight-byte that consists of a
small integer + padding as that small integer.  On code
like:

struct c { double x; int y; };
void bar(struct c C) { }

This means that we compile to:

define void @bar(double %C.coerce0, i32 %C.coerce1) nounwind {
entry:
  %C = alloca %struct.c, align 8                  ; <%struct.c*> [#uses=2]
  %0 = getelementptr %struct.c* %C, i32 0, i32 0  ; <double*> [#uses=1]
  store double %C.coerce0, double* %0
  %1 = getelementptr %struct.c* %C, i32 0, i32 1  ; <i32*> [#uses=1]
  store i32 %C.coerce1, i32* %1

instead of:

define void @bar(double %C.coerce0, i64 %C.coerce1) nounwind {
entry:
  %C = alloca %struct.c, align 8                  ; <%struct.c*> [#uses=3]
  %0 = bitcast %struct.c* %C to %0*               ; <%0*> [#uses=2]
  %1 = getelementptr %0* %0, i32 0, i32 0         ; <double*> [#uses=1]
  store double %C.coerce0, double* %1
  %2 = getelementptr %0* %0, i32 0, i32 1         ; <i64*> [#uses=1]
  store i64 %C.coerce1, i64* %2

which gives SRoA heartburn.

This implements rdar://5711709, a nice low number :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109737 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove new test (that requires RegionStore) into its own file.
Jordy Rose [Thu, 29 Jul 2010 07:11:59 +0000 (07:11 +0000)]
Move new test (that requires RegionStore) into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109736 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a builder, why didn't clang++ catch this?
Chris Lattner [Thu, 29 Jul 2010 06:44:09 +0000 (06:44 +0000)]
fix a builder, why didn't clang++ catch this?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109735 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse a LazyCompoundVal to handle initialization with a string literal, rather than...
Jordy Rose [Thu, 29 Jul 2010 06:40:33 +0000 (06:40 +0000)]
Use a LazyCompoundVal to handle initialization with a string literal, rather than copying each character.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109734 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill off the 'coerce' ABI passing form. Now 'direct' and 'extend' always
Chris Lattner [Thu, 29 Jul 2010 06:26:06 +0000 (06:26 +0000)]
Kill off the 'coerce' ABI passing form.  Now 'direct' and 'extend' always
have a "coerce to" type which often matches the default lowering of Clang
type to LLVM IR type, but the coerce case can be handled by making them
not be the same.

This simplifies things and fixes issues where X86-64 abi lowering would
return coerce after making preferred types exactly match up.  This caused
us to compile:

typedef float v4f32 __attribute__((__vector_size__(16)));
v4f32 foo(v4f32 X) {
  return X+X;
}

into this code at -O0:

define <4 x float> @foo(<4 x float> %X.coerce) nounwind {
entry:
  %retval = alloca <4 x float>, align 16          ; <<4 x float>*> [#uses=2]
  %coerce = alloca <4 x float>, align 16          ; <<4 x float>*> [#uses=2]
  %X.addr = alloca <4 x float>, align 16          ; <<4 x float>*> [#uses=3]
  store <4 x float> %X.coerce, <4 x float>* %coerce
  %X = load <4 x float>* %coerce                  ; <<4 x float>> [#uses=1]
  store <4 x float> %X, <4 x float>* %X.addr
  %tmp = load <4 x float>* %X.addr                ; <<4 x float>> [#uses=1]
  %tmp1 = load <4 x float>* %X.addr               ; <<4 x float>> [#uses=1]
  %add = fadd <4 x float> %tmp, %tmp1             ; <<4 x float>> [#uses=1]
  store <4 x float> %add, <4 x float>* %retval
  %0 = load <4 x float>* %retval                  ; <<4 x float>> [#uses=1]
  ret <4 x float> %0
}

Now we get:

define <4 x float> @foo(<4 x float> %X) nounwind {
entry:
  %X.addr = alloca <4 x float>, align 16          ; <<4 x float>*> [#uses=3]
  store <4 x float> %X, <4 x float>* %X.addr
  %tmp = load <4 x float>* %X.addr                ; <<4 x float>> [#uses=1]
  %tmp1 = load <4 x float>* %X.addr               ; <<4 x float>> [#uses=1]
  %add = fadd <4 x float> %tmp, %tmp1             ; <<4 x float>> [#uses=1]
  ret <4 x float> %add
}

This implements rdar://8248065

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109733 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoignore structs that wrap vectors in IR, the abstraction shouldn't add penalty.
Chris Lattner [Thu, 29 Jul 2010 05:02:29 +0000 (05:02 +0000)]
ignore structs that wrap vectors in IR, the abstraction shouldn't add penalty.

Before we'd compile the example into something like:

  %coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
  %1 = bitcast <4 x float>* %coerce.dive2 to <2 x double>* ; <<2 x double>*> [#uses=1]
  %2 = load <2 x double>* %1, align 1             ; <<2 x double>> [#uses=1]
  ret <2 x double> %2

Now we produce:

  %coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
  %0 = load <4 x float>* %coerce.dive2, align 1   ; <<4 x float>> [#uses=1]
  ret <4 x float> %0

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109732 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove the 'pretty 16-byte vector' inferring code up to be shared
Chris Lattner [Thu, 29 Jul 2010 04:56:46 +0000 (04:56 +0000)]
move the 'pretty 16-byte vector' inferring code up to be shared
with return values, improving stuff that returns __m128 etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109731 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosimplify code by eliminating a premature optimization.
Chris Lattner [Thu, 29 Jul 2010 04:51:12 +0000 (04:51 +0000)]
simplify code by eliminating a premature optimization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109730 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonow that we have CGT around, we can start using preferred types
Chris Lattner [Thu, 29 Jul 2010 04:46:19 +0000 (04:46 +0000)]
now that we have CGT around, we can start using preferred types
for return values too.  Instead of compiling something like:

struct foo {
  int *X;
  float *Y;
};

struct foo test(struct foo *P) { return *P; }

to:

%1 = type { i64, i64 }

define %1 @test(%struct.foo* %P) nounwind {
entry:
  %retval = alloca %struct.foo, align 8           ; <%struct.foo*> [#uses=2]
  %P.addr = alloca %struct.foo*, align 8          ; <%struct.foo**> [#uses=2]
  store %struct.foo* %P, %struct.foo** %P.addr
  %tmp = load %struct.foo** %P.addr               ; <%struct.foo*> [#uses=1]
  %tmp1 = bitcast %struct.foo* %retval to i8*     ; <i8*> [#uses=1]
  %tmp2 = bitcast %struct.foo* %tmp to i8*        ; <i8*> [#uses=1]
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
  %0 = bitcast %struct.foo* %retval to %1*        ; <%1*> [#uses=1]
  %1 = load %1* %0, align 1                       ; <%1> [#uses=1]
  ret %1 %1
}

We now get the result more type safe, with:

define %struct.foo @test(%struct.foo* %P) nounwind {
entry:
  %retval = alloca %struct.foo, align 8           ; <%struct.foo*> [#uses=2]
  %P.addr = alloca %struct.foo*, align 8          ; <%struct.foo**> [#uses=2]
  store %struct.foo* %P, %struct.foo** %P.addr
  %tmp = load %struct.foo** %P.addr               ; <%struct.foo*> [#uses=1]
  %tmp1 = bitcast %struct.foo* %retval to i8*     ; <i8*> [#uses=1]
  %tmp2 = bitcast %struct.foo* %tmp to i8*        ; <i8*> [#uses=1]
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
  %0 = load %struct.foo* %retval                  ; <%struct.foo> [#uses=1]
  ret %struct.foo %0
}

That memcpy is completely terrible, but I don't know how to fix it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109729 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosink preferred type stuff lower. It's possible that this might
Chris Lattner [Thu, 29 Jul 2010 04:41:05 +0000 (04:41 +0000)]
sink preferred type stuff lower.  It's possible that this might
improve codegen for vaarg or something, because its codepath is
getting preferred types now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109728 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTranscribe clattner email to SVN.
Daniel Dunbar [Thu, 29 Jul 2010 02:46:02 +0000 (02:46 +0000)]
Transcribe clattner email to SVN.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109727 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodissolve some more complexity: make the x86-64 abi lowering code
Chris Lattner [Thu, 29 Jul 2010 02:31:05 +0000 (02:31 +0000)]
dissolve some more complexity: make the x86-64 abi lowering code
compute its own preferred types instead of having CGT compute
them then pass them (circuituously) down into ABIInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109726 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange #pragma crash to segv, instead of abort.
Daniel Dunbar [Thu, 29 Jul 2010 02:25:07 +0000 (02:25 +0000)]
Change #pragma crash to segv, instead of abort.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109725 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosimplify Get8ByteTypeAtOffset by making it a member of X86_64ABIInfo
Chris Lattner [Thu, 29 Jul 2010 02:20:19 +0000 (02:20 +0000)]
simplify Get8ByteTypeAtOffset by making it a member of X86_64ABIInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109724 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonow that ABIInfo depends on CGT, it has trivial access to such
Chris Lattner [Thu, 29 Jul 2010 02:16:43 +0000 (02:16 +0000)]
now that ABIInfo depends on CGT, it has trivial access to such
things as TargetData, ASTContext, LLVMContext etc.  Stop passing
them through so many APIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109723 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocave in to reality and make ABIInfo depend on CodeGenTypes.
Chris Lattner [Thu, 29 Jul 2010 02:01:43 +0000 (02:01 +0000)]
cave in to reality and make ABIInfo depend on CodeGenTypes.

This will simplify a bunch of code, coming up next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109722 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach GRExprEngine::VisitLValue() about FloatingLiteral, ImaginaryLiteral, and Charac...
Ted Kremenek [Thu, 29 Jul 2010 01:31:59 +0000 (01:31 +0000)]
Teach GRExprEngine::VisitLValue() about FloatingLiteral, ImaginaryLiteral, and CharacterLiteral.  Fixes an assertion failure reported in PR 7675.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109719 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCheck for an invalid SourceLocation in clang_getCursor(). This avoids a possible...
Ted Kremenek [Thu, 29 Jul 2010 00:52:07 +0000 (00:52 +0000)]
Check for an invalid SourceLocation in clang_getCursor().  This avoids a possible assertion failure in SourceManager in the call to Lexer::GetBeginningOfToken().  Fixes <rdar://problem/8244873>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109713 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAugment RegionStore::BindStruct() to bind symbolicated struct values. This fixes...
Ted Kremenek [Thu, 29 Jul 2010 00:28:47 +0000 (00:28 +0000)]
Augment RegionStore::BindStruct() to bind symbolicated struct values.  This fixes a false path issue reported in <rdar://problem/8243408> and also spurs another cause where the idempotent operations checker fires.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109710 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange SymbolManager::canSymbolicate() to return true for RecordTypes.
Ted Kremenek [Thu, 29 Jul 2010 00:28:43 +0000 (00:28 +0000)]
Change SymbolManager::canSymbolicate() to return true for RecordTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109709 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExplicitly guard in BasicStore from storing to non-scalars.
Ted Kremenek [Thu, 29 Jul 2010 00:28:40 +0000 (00:28 +0000)]
Explicitly guard in BasicStore from storing to non-scalars.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109708 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove extraneous guards around the call to getConjuredSymbolVal(). These checks...
Ted Kremenek [Thu, 29 Jul 2010 00:28:33 +0000 (00:28 +0000)]
Remove extraneous guards around the call to getConjuredSymbolVal().  These checks are already done within getConjuredSymbolVal() itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109707 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVisit the children of CXXOperatorCallExprs in source order within
Douglas Gregor [Thu, 29 Jul 2010 00:26:18 +0000 (00:26 +0000)]
Visit the children of CXXOperatorCallExprs in source order within
libclang, so that clang_annotateTokens() doesn't get confused and miss
annotations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109706 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't set out-of-line template specialization/definition information
Douglas Gregor [Wed, 28 Jul 2010 23:59:57 +0000 (23:59 +0000)]
Don't set out-of-line template specialization/definition information
for AST nodes that aren't actually out-of-line (i.e., require a
nested-name-specifier). Fixes <rdar://problem/8204126>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109704 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agopass argument vectors in a type that corresponds to the user type if
Chris Lattner [Wed, 28 Jul 2010 23:47:21 +0000 (23:47 +0000)]
pass argument vectors in a type that corresponds to the user type if
possible.  This improves the example to pass <4 x float> instead of
<2 x double> but we still get awful code, and still don't get the
return value right.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109700 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up
Chris Lattner [Wed, 28 Jul 2010 23:46:15 +0000 (23:46 +0000)]
tidy up

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109699 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInitialize block's imported variable(s) in
Fariborz Jahanian [Wed, 28 Jul 2010 23:27:30 +0000 (23:27 +0000)]
Initialize block's imported variable(s) in
block's synthesized constructor initalizer list.
Fixes radar 8240371.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109698 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPR7736: Make sure to mark &Class::Member correctly as being type-dependent
Eli Friedman [Wed, 28 Jul 2010 23:26:18 +0000 (23:26 +0000)]
PR7736: Make sure to mark &Class::Member correctly as being type-dependent
inside a template class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109697 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOverride selected builtin names (e.g. "long int" instead of "long") to match names...
Devang Patel [Wed, 28 Jul 2010 23:23:29 +0000 (23:23 +0000)]
Override selected builtin names (e.g. "long int" instead of "long") to match names used by gcc in debug info. This makes gdb testsuite happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109694 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix some break statements to be formatted more consistently,
Chris Lattner [Wed, 28 Jul 2010 23:12:33 +0000 (23:12 +0000)]
fix some break statements to be formatted more consistently,
remove some now-dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109690 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse Get8ByteTypeAtOffset for the return value path as well so we
Chris Lattner [Wed, 28 Jul 2010 23:06:14 +0000 (23:06 +0000)]
use Get8ByteTypeAtOffset for the return value path as well so we
don't get errors similar to PR7714 on the return path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109689 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorefactor the autosizing code, eliminating duplication
Chris Lattner [Wed, 28 Jul 2010 22:44:07 +0000 (22:44 +0000)]
refactor the autosizing code, eliminating duplication
and making Get8ByteTypeAtOffset always succeed and documented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109685 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't die when a member access refers to a non-class member via a
Douglas Gregor [Wed, 28 Jul 2010 22:27:52 +0000 (22:27 +0000)]
Don't die when a member access refers to a non-class member via a
qualified name. Fixes <rdar://problem/8231724>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109682 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix PR7714 by not referencing off the end of a struct when passed by value in
Chris Lattner [Wed, 28 Jul 2010 22:15:08 +0000 (22:15 +0000)]
fix PR7714 by not referencing off the end of a struct when passed by value in
x86-64 abi.  This also improves codegen as well.  Some refactoring is needed of
this code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109681 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTurn off precompiled preamble support for C++
Douglas Gregor [Wed, 28 Jul 2010 22:12:37 +0000 (22:12 +0000)]
Turn off precompiled preamble support for C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109680 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen performing code completion for a case statement in a switch whose
Douglas Gregor [Wed, 28 Jul 2010 21:50:18 +0000 (21:50 +0000)]
When performing code completion for a case statement in a switch whose
condition is not of enumeration type, provide code-completion results
containing all values of integral or enumeral type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109677 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport extended vector types in chained PCH.
Sebastian Redl [Wed, 28 Jul 2010 21:38:49 +0000 (21:38 +0000)]
Support extended vector types in chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109675 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a test case for tentative definitions in chained PCH. Fix a bug that completely...
Sebastian Redl [Wed, 28 Jul 2010 21:07:02 +0000 (21:07 +0000)]
Add a test case for tentative definitions in chained PCH. Fix a bug that completely messed up source locations and thus caused a crash whenever a diagnostic was emitted in chained PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109660 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix flags in global block descriptor when
Fariborz Jahanian [Wed, 28 Jul 2010 19:07:18 +0000 (19:07 +0000)]
Fix flags in global block descriptor when
block returns structs. Fies radar 8241648.
Executable test added to llvm test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109620 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake the pointer arguments to the __sync_* builtins pointers to
Douglas Gregor [Wed, 28 Jul 2010 18:42:27 +0000 (18:42 +0000)]
Make the pointer arguments to the __sync_* builtins pointers to
volatile-qualified types. Fixes <rdar://problem/8228293>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109618 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosome cleanups and get alignments correct for various coerce cases.
Chris Lattner [Wed, 28 Jul 2010 18:24:28 +0000 (18:24 +0000)]
some cleanups and get alignments correct for various coerce cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109607 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe grammar for GNU typeof in C requires an expression to be
Douglas Gregor [Wed, 28 Jul 2010 18:22:12 +0000 (18:22 +0000)]
The grammar for GNU typeof in C requires an expression to be
parenthesized, unlike in C++, e.g.,

  C has: typeof ( expression)
  C++ has: typeof unary-expression

So, once we've parsed a parenthesized expression after typeof, we
should only go on to parse the postfix expression suffix if we're in
C++. Fixes <rdar://problem/8237491>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109606 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest commit
Tanya Lattner [Wed, 28 Jul 2010 18:19:43 +0000 (18:19 +0000)]
Test commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109604 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest commit.
Tanya Lattner [Wed, 28 Jul 2010 18:08:38 +0000 (18:08 +0000)]
Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109601 91177308-0d34-0410-b5e6-96231b3b80d8