]> granicus.if.org Git - clang/log
clang
14 years agoIntroduce new libclang API functions that determine the availability
Douglas Gregor [Mon, 23 Aug 2010 23:00:57 +0000 (23:00 +0000)]
Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.

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

14 years agoHandling remaining rule for synthesize bitfields in
Fariborz Jahanian [Mon, 23 Aug 2010 22:46:52 +0000 (22:46 +0000)]
Handling remaining rule for synthesize bitfields in
class extensions (nonfragile-abi2).For every class @interface and class
extension @interface, if the last ivar is a bitfield of any type,
then add an implicit `char :0` ivar to the end of that interface.

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

14 years agoDriver: Move Clang "triple" computation routines to method on the
Daniel Dunbar [Mon, 23 Aug 2010 22:35:37 +0000 (22:35 +0000)]
Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
 - This introduces some gross code duplication, but the right fix for it is to
   just move the Driver to start depending on the targets in libBasic, so I am
   not planning on fixing it immediately.

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

14 years agolibclang: Print more information when recovering from crashes in
Daniel Dunbar [Mon, 23 Aug 2010 22:35:34 +0000 (22:35 +0000)]
libclang: Print more information when recovering from crashes in
clang_parseTranslationUnit.

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

14 years agoEmit debug info for enum constants.
Devang Patel [Mon, 23 Aug 2010 22:07:25 +0000 (22:07 +0000)]
Emit debug info for enum constants.

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

14 years agoInclude __FUNCTION__, __PRETTY_FUNCTION_, __func__ in code-completion
Douglas Gregor [Mon, 23 Aug 2010 21:54:33 +0000 (21:54 +0000)]
Include __FUNCTION__, __PRETTY_FUNCTION_, __func__ in code-completion
results for expression contexts within a function.

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

14 years agoIntroduce a code-completion hook for the Objective-C collection
Douglas Gregor [Mon, 23 Aug 2010 21:17:50 +0000 (21:17 +0000)]
Introduce a code-completion hook for the Objective-C collection
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).

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

14 years agoReinstate the code for emitting an initial debug type for a struct,
Dan Gohman [Mon, 23 Aug 2010 21:15:56 +0000 (21:15 +0000)]
Reinstate the code for emitting an initial debug type for a struct,
to handle the case where the struct is only forward-declared. In
this case, a temporary MDNode is not needed and not desired.

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

14 years agoDriver/Darwin: Switch to using simplified tool chain by default -- what better
Daniel Dunbar [Mon, 23 Aug 2010 20:58:55 +0000 (20:58 +0000)]
Driver/Darwin: Switch to using simplified tool chain by default -- what better
way to see what will break! :)

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

14 years agoDriver/Darwin: When using the simplified Clang toolchain, make sure to also pass
Daniel Dunbar [Mon, 23 Aug 2010 20:58:52 +0000 (20:58 +0000)]
Driver/Darwin: When using the simplified Clang toolchain, make sure to also pass
the arch specific gcc lib path.

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

14 years agoDriver: Update -ccc-install-dir to also set the installed dir. Totally
Daniel Dunbar [Mon, 23 Aug 2010 20:58:50 +0000 (20:58 +0000)]
Driver: Update -ccc-install-dir to also set the installed dir. Totally
non-obvious.

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

14 years agoModified pseudoconstant test case to make it a bit clearer and fix a missing line
Tom Care [Mon, 23 Aug 2010 19:57:25 +0000 (19:57 +0000)]
Modified pseudoconstant test case to make it a bit clearer and fix a missing line

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

14 years agoSeveral small changes to PseudoConstantAnalysis and the way IdempotentOperationChecke...
Tom Care [Mon, 23 Aug 2010 19:51:57 +0000 (19:51 +0000)]
Several small changes to PseudoConstantAnalysis and the way IdempotentOperationChecker uses it.
- Psuedo -> Pseudo (doh...)
- C++ reference support
- Added pseudoconstant test case for __block vars
- Separated out static local checking from pseudoconstant analysis and generalized to non-local checking
- Added missing test cases for storage false positives

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

14 years agoDon't include macro results when we're completing a declarator.
Douglas Gregor [Mon, 23 Aug 2010 19:33:40 +0000 (19:33 +0000)]
Don't include macro results when we're completing a declarator.

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

14 years agoSupport for IRGen of synthesize bitfield ivars in
Fariborz Jahanian [Mon, 23 Aug 2010 18:51:39 +0000 (18:51 +0000)]
Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).

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

14 years agotest case for PR7920.
Devang Patel [Mon, 23 Aug 2010 18:26:10 +0000 (18:26 +0000)]
test case for PR7920.

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

14 years agoIntroduce a new code-completion point when we're parsing a
Douglas Gregor [Mon, 23 Aug 2010 18:23:48 +0000 (18:23 +0000)]
Introduce a new code-completion point when we're parsing a
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.

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

14 years agoEmit an error noting that Clang does not support code generation for
Douglas Gregor [Mon, 23 Aug 2010 14:50:27 +0000 (14:50 +0000)]
Emit an error noting that Clang does not support code generation for
the ternary operator without a left-hand side in C++ (PR7726), from
Jean-Daniel Dupas!

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

14 years agoAdd XML for CXXConstructExpr, from Benoit Belley!
Douglas Gregor [Mon, 23 Aug 2010 14:44:46 +0000 (14:44 +0000)]
Add XML for CXXConstructExpr, from Benoit Belley!

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

14 years agoWhen complaining about a duplicate declspec, provide a Fix-It that
Douglas Gregor [Mon, 23 Aug 2010 14:34:43 +0000 (14:34 +0000)]
When complaining about a duplicate declspec, provide a Fix-It that
removes the copy. Patch from Eelis van der Weegen, tweaked/updated by
me.

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

14 years agoClarify documentation of escaping for backslash
Douglas Gregor [Mon, 23 Aug 2010 14:03:03 +0000 (14:03 +0000)]
Clarify documentation of escaping for backslash

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

14 years agoAdd a virtual destructor to the base of another class hierarchy with virtual
Chandler Carruth [Mon, 23 Aug 2010 08:37:21 +0000 (08:37 +0000)]
Add a virtual destructor to the base of another class hierarchy with virtual
methods.

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

14 years agoRelax the construction of a definition for implicit, trivial default
Chandler Carruth [Mon, 23 Aug 2010 07:55:51 +0000 (07:55 +0000)]
Relax the construction of a definition for implicit, trivial default
constructors. We perform semantic checking when creating the definition, and
this isn't needed in certain contexts (value initialization) but is in others
(default initialization). This fixes PR7948.

We add explicit code to the default initialization path to ensure the
definition is both present and valid.

Doug, please review. I think this follows your latest suggestion, and it ended
up remarkably cleaner than I anticipated. Also let me know if similar logic
should be followed for destructors and copy-constructors.

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

14 years agoPush DeclGroupRefs and TemplateNames in an opaque but type-safe way
John McCall [Mon, 23 Aug 2010 07:28:44 +0000 (07:28 +0000)]
Push DeclGroupRefs and TemplateNames in an opaque but type-safe way
through the parser.

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

14 years agoIn Sema::AddBuiltinOperatorCandidates, candidate pointer types set can also contain...
Argyrios Kyrtzidis [Mon, 23 Aug 2010 07:12:16 +0000 (07:12 +0000)]
In Sema::AddBuiltinOperatorCandidates, candidate pointer types set can also contain a ObjCObjectPointerType since r111699.

Don't assume that they are only PointerTypes or we will crash.

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

14 years agochandlerc pointed out that ending a line with /\ is not very friendly. :)
John McCall [Mon, 23 Aug 2010 06:56:36 +0000 (06:56 +0000)]
chandlerc pointed out that ending a line with /\ is not very friendly. :)

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

14 years agoKill off Parser::TemplateParameterList to avoid misparses.
John McCall [Mon, 23 Aug 2010 06:53:58 +0000 (06:53 +0000)]
Kill off Parser::TemplateParameterList to avoid misparses.

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

14 years agoSundry incremental steps towards killing off Action.
John McCall [Mon, 23 Aug 2010 06:44:23 +0000 (06:44 +0000)]
Sundry incremental steps towards killing off Action.

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

14 years agofix rdar://8340348, a miscompile of boost that was exposed by r109848.
Chris Lattner [Mon, 23 Aug 2010 05:26:13 +0000 (05:26 +0000)]
fix rdar://8340348, a miscompile of boost that was exposed by r109848.
That revision started classifying truly empty structs like "Y" and "X"
as being NoClass/NoClass and turning them into 'ignore'.  The call code
turns around and allocates space for the ignored argument with
GetUndefRValue.  The bug is that GetUndefRValue would return the address
as undef, instead of returning an object with a defined address but
undefined contents.

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

14 years agoAdjust code placement.
Zhongxing Xu [Mon, 23 Aug 2010 01:37:32 +0000 (01:37 +0000)]
Adjust code placement.

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

14 years agoAbstract out everything having to do with member pointers into the ABI
John McCall [Mon, 23 Aug 2010 01:21:21 +0000 (01:21 +0000)]
Abstract out everything having to do with member pointers into the ABI
class;  they should just be completely opaque throughout IR gen now,
although I haven't really audited that.

Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.

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

14 years agoExtract a method to check whether a function is the global placement
John McCall [Mon, 23 Aug 2010 01:17:59 +0000 (01:17 +0000)]
Extract a method to check whether a function is the global placement
operator new[].

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

14 years agoGo back to asking CodeGenTypes whether a type is zero-initializable.
John McCall [Sun, 22 Aug 2010 21:01:12 +0000 (21:01 +0000)]
Go back to asking CodeGenTypes whether a type is zero-initializable.
Make CGT defer to the ABI on all member pointer types.
This requires giving CGT a handle to the ABI.
It's way easier to make that work if we avoid lazily creating the ABI.
Make it so.

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

14 years agoAdd x86intrin.h which is generic x86 intrinsics for more than just Intel. Thus
Nick Lewycky [Sun, 22 Aug 2010 20:38:05 +0000 (20:38 +0000)]
Add x86intrin.h which is generic x86 intrinsics for more than just Intel. Thus
far, this just #include's immintrin.h for compatibility.

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

14 years agoDo not elide copy construction when we're performing base-class initialization
Douglas Gregor [Sun, 22 Aug 2010 18:27:02 +0000 (18:27 +0000)]
Do not elide copy construction when we're performing base-class initialization

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

14 years agoEliminate a stale assertion. Fixes Clang self-host.
Douglas Gregor [Sun, 22 Aug 2010 18:26:35 +0000 (18:26 +0000)]
Eliminate a stale assertion. Fixes Clang self-host.

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

14 years agoPreserve the zero-initialization and construction-kind settings when
Douglas Gregor [Sun, 22 Aug 2010 17:20:18 +0000 (17:20 +0000)]
Preserve the zero-initialization and construction-kind settings when
instantiating CXXConstructExpr expressions.

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

14 years agoWhen performing value-initialization for a class with a non-trivial,
Douglas Gregor [Sun, 22 Aug 2010 16:15:35 +0000 (16:15 +0000)]
When performing value-initialization for a class with a non-trivial,
implicitly-defined default constructor, zero-initialize the memory
before calling the default constructor. Previously, we would only
zero-initialize in the case of a trivial default constructor.

Also, simplify the hideous logic that determines when we have a
trivial default constructor and, therefore, don't need to emit any
call at all.

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

14 years agoClean up a very silly use of first-class aggregates.
John McCall [Sun, 22 Aug 2010 11:04:31 +0000 (11:04 +0000)]
Clean up a very silly use of first-class aggregates.

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

14 years agoExperiment with using first-class aggregates to represent member function
John McCall [Sun, 22 Aug 2010 10:59:02 +0000 (10:59 +0000)]
Experiment with using first-class aggregates to represent member function
pointers.  I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.

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

14 years agoExtract member function pointer comparison and null comparison into
John McCall [Sun, 22 Aug 2010 08:30:07 +0000 (08:30 +0000)]
Extract member function pointer comparison and null comparison into
the ABI code.  Implement correct semantics for these on ARM.

I believe this completes the implementation of member function pointers
on ARM.

I think I'm going to switch member function pointers over to be
non-aggregates while I have all this in mind.

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

14 years agoAdd two new enumerations to the unsupported list for Windows so that all cases
Chandler Carruth [Sun, 22 Aug 2010 06:56:37 +0000 (06:56 +0000)]
Add two new enumerations to the unsupported list for Windows so that all cases
are handled.

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

14 years agoAbstract out member-pointer creation. I'm really unhappy about the current
John McCall [Sun, 22 Aug 2010 06:43:33 +0000 (06:43 +0000)]
Abstract out member-pointer creation.  I'm really unhappy about the current
duplication between the constant and non-constant paths in all of this.

Implement ARM ABI semantics for member pointer constants and conversion.

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

14 years agoAbstract more member-pointerness out.
John McCall [Sun, 22 Aug 2010 04:16:24 +0000 (04:16 +0000)]
Abstract more member-pointerness out.

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

14 years agoAbstract out member-pointer conversions.
John McCall [Sun, 22 Aug 2010 03:04:22 +0000 (03:04 +0000)]
Abstract out member-pointer conversions.

Pretty much everything having to do with member pointers is ABI-specific.

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

14 years agoDetabify.
Eli Friedman [Sun, 22 Aug 2010 01:00:03 +0000 (01:00 +0000)]
Detabify.

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

14 years agoImplement the call parts of the member-function-pointer ARM C++ ABI.
John McCall [Sun, 22 Aug 2010 00:59:17 +0000 (00:59 +0000)]
Implement the call parts of the member-function-pointer ARM C++ ABI.

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

14 years agoExtract calls to method pointers out as an ABI routine.
John McCall [Sun, 22 Aug 2010 00:05:51 +0000 (00:05 +0000)]
Extract calls to method pointers out as an ABI routine.
No functionality change.

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

14 years agoThe ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
John McCall [Sat, 21 Aug 2010 22:46:04 +0000 (22:46 +0000)]
The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator.  Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.

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

14 years agoVisual Studio tools used on win32 hosts when targeting win32.
Michael J. Spencer [Sat, 21 Aug 2010 21:55:07 +0000 (21:55 +0000)]
Visual Studio tools used on win32 hosts when targeting win32.

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

14 years agotwik to my previous patch for pr7936.
Fariborz Jahanian [Sat, 21 Aug 2010 17:11:09 +0000 (17:11 +0000)]
twik to my previous patch for pr7936.
Build qualified version of ObjC pointers (not pointers) when
doing overload resolution.

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

14 years agoAvoid including mm_malloc.h in a cc1 test, it pulls in system headers.
Benjamin Kramer [Sat, 21 Aug 2010 13:39:38 +0000 (13:39 +0000)]
Avoid including mm_malloc.h in a cc1 test, it pulls in system headers.

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

14 years agoPlace method near its class.
Zhongxing Xu [Sat, 21 Aug 2010 12:24:38 +0000 (12:24 +0000)]
Place method near its class.

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

14 years agoRemove dead code.
Zhongxing Xu [Sat, 21 Aug 2010 11:05:46 +0000 (11:05 +0000)]
Remove dead code.

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

14 years agoImprove comments.
Zhongxing Xu [Sat, 21 Aug 2010 11:03:37 +0000 (11:03 +0000)]
Improve comments.

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

14 years agoRemove a special case for OSAtomic functions. We can already bind and retrieve
Zhongxing Xu [Sat, 21 Aug 2010 11:00:26 +0000 (11:00 +0000)]
Remove a special case for OSAtomic functions. We can already bind and retrieve
with the same binding key. The only trick here is that sometimes the Symbolic
region is stored in with an LocAsInteger wrapper. We unwrap that in
SVal::getAsLocSymbol().

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

14 years agoDeclPtrTy -> Decl *
John McCall [Sat, 21 Aug 2010 09:40:31 +0000 (09:40 +0000)]
DeclPtrTy -> Decl *

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

14 years agoRemove dead code. We no longer need it because now we treat the first element
Zhongxing Xu [Sat, 21 Aug 2010 08:55:42 +0000 (08:55 +0000)]
Remove dead code. We no longer need it because now we treat the first element
region and its base region as the same binding key.

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

14 years agoremove unused variable.
Zhongxing Xu [Sat, 21 Aug 2010 06:51:45 +0000 (06:51 +0000)]
remove unused variable.

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

14 years agoWhen invalidating a struct region, whether its type definition exists is not
Zhongxing Xu [Sat, 21 Aug 2010 06:26:59 +0000 (06:26 +0000)]
When invalidating a struct region, whether its type definition exists is not
relavant any more, because we set its default value to a symbol, and the type of
default symbolic value is irrelavant.

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

14 years agoFix typo in comment.
Michael J. Spencer [Sat, 21 Aug 2010 06:05:06 +0000 (06:05 +0000)]
Fix typo in comment.

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

14 years agoThis test needs a triple: it's checking the alignment of a pointer in bytes.
John McCall [Sat, 21 Aug 2010 04:58:16 +0000 (04:58 +0000)]
This test needs a triple: it's checking the alignment of a pointer in bytes.

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

14 years agoIRgen: Set the alignment correctly when creating LValue for a decls.
Daniel Dunbar [Sat, 21 Aug 2010 04:20:22 +0000 (04:20 +0000)]
IRgen: Set the alignment correctly when creating LValue for a decls.
 - Fixes PR5598.
 - Review appreciated.

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

14 years agoCodeGenFunction: Eliminate unused MakeQualifiers() function.
Daniel Dunbar [Sat, 21 Aug 2010 04:13:07 +0000 (04:13 +0000)]
CodeGenFunction: Eliminate unused MakeQualifiers() function.

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

14 years agoSimplify.
Daniel Dunbar [Sat, 21 Aug 2010 04:05:54 +0000 (04:05 +0000)]
Simplify.

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

14 years agoIRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form...
Daniel Dunbar [Sat, 21 Aug 2010 03:58:45 +0000 (03:58 +0000)]
IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form of MakeAddr().

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

14 years agoIRgen: Move remaining LValue::Set... methods to LValue::set... (non-static) methods.
Daniel Dunbar [Sat, 21 Aug 2010 03:51:29 +0000 (03:51 +0000)]
IRgen: Move remaining LValue::Set... methods to LValue::set... (non-static) methods.

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

14 years agoIRgen: Move remaining MakeAddr() calls to MakeAddrLValue().
Daniel Dunbar [Sat, 21 Aug 2010 03:44:13 +0000 (03:44 +0000)]
IRgen: Move remaining MakeAddr() calls to MakeAddrLValue().

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

14 years agoIRgen: The CVR qualifiers in a subobject adjustment should just come from the
Daniel Dunbar [Sat, 21 Aug 2010 03:37:02 +0000 (03:37 +0000)]
IRgen: The CVR qualifiers in a subobject adjustment should just come from the
field (I think).
 - Doug, please check.

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

14 years agoIRgen/CGValue: Add getQuals(), so qualifiers can be modified on an LValue.
Daniel Dunbar [Sat, 21 Aug 2010 03:29:54 +0000 (03:29 +0000)]
IRgen/CGValue: Add getQuals(), so qualifiers can be modified on an LValue.

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

14 years agoIRgen/LValue: Add LValue::setNonGC instead of SetObjCNonGC, for consistency with...
Daniel Dunbar [Sat, 21 Aug 2010 03:22:38 +0000 (03:22 +0000)]
IRgen/LValue: Add LValue::setNonGC instead of SetObjCNonGC, for consistency with isNonGC().

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

14 years agoIRgen: Switch more MakeAddr() users to MakeAddrLValue; this time for calls which...
Daniel Dunbar [Sat, 21 Aug 2010 03:15:20 +0000 (03:15 +0000)]
IRgen: Switch more MakeAddr() users to MakeAddrLValue; this time for calls which were previously not computing the qualifier list. In most cases, I don't think it matters, but I believe this is conservatively more correct / consistent.

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

14 years agoIRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue.
Daniel Dunbar [Sat, 21 Aug 2010 03:08:16 +0000 (03:08 +0000)]
IRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue.

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

14 years agoIRgen: Eliminate EmitPredefinedFunctionName(), it doesn't need to be factored out.
Daniel Dunbar [Sat, 21 Aug 2010 03:01:12 +0000 (03:01 +0000)]
IRgen: Eliminate EmitPredefinedFunctionName(), it doesn't need to be factored out.

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

14 years agoIRgen: Add an LValue::MakeAddr variant which takes a type and uses that to build
Daniel Dunbar [Sat, 21 Aug 2010 02:53:44 +0000 (02:53 +0000)]
IRgen: Add an LValue::MakeAddr variant which takes a type and uses that to build
the qualifiers.

Also, add CodeGenFunction::MakeAddrLValue() helper function which passes in the
ASTContext.

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

14 years agoImprove test coverage.
Daniel Dunbar [Sat, 21 Aug 2010 02:46:28 +0000 (02:46 +0000)]
Improve test coverage.

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

14 years agoDelete an obsolete comment.
Dan Gohman [Sat, 21 Aug 2010 02:41:29 +0000 (02:41 +0000)]
Delete an obsolete comment.

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

14 years agoIRgen/CGValue: Add alignment to LValue, and use that alignment when generating lvalue...
Daniel Dunbar [Sat, 21 Aug 2010 02:39:23 +0000 (02:39 +0000)]
IRgen/CGValue: Add alignment to LValue, and use that alignment when generating lvalue load/stores.

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

14 years agoIRgen/LValue: Rename SetQualifiers() to Initialize().
Daniel Dunbar [Sat, 21 Aug 2010 02:31:58 +0000 (02:31 +0000)]
IRgen/LValue: Rename SetQualifiers() to Initialize().

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

14 years agoIRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and
Daniel Dunbar [Sat, 21 Aug 2010 02:24:36 +0000 (02:24 +0000)]
IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and
update callers as best I can.
 - This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement.
 - Serious review appreciated.

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

14 years agoIRgen: Use Ty consistently in this function.
Daniel Dunbar [Sat, 21 Aug 2010 02:17:08 +0000 (02:17 +0000)]
IRgen: Use Ty consistently in this function.

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

14 years agofilecheckize test
Chris Lattner [Sat, 21 Aug 2010 00:29:50 +0000 (00:29 +0000)]
filecheckize test

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

14 years agofix PR7943, a corner case with the GNU __VA_ARGS__ comma
Chris Lattner [Sat, 21 Aug 2010 00:27:00 +0000 (00:27 +0000)]
fix PR7943, a corner case with the GNU __VA_ARGS__ comma
swallowing extension.

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

14 years agoContributed test case for PR7936
Fariborz Jahanian [Sat, 21 Aug 2010 00:17:33 +0000 (00:17 +0000)]
Contributed test case for PR7936
by Jean-Daniel Dupas.

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

14 years agopatch to support comparison involving
Fariborz Jahanian [Sat, 21 Aug 2010 00:10:36 +0000 (00:10 +0000)]
patch to support comparison involving
objctive-c pointer conversions. Fixes pr7936.

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

14 years agoFix an issue with writing to PCH another included PCH, introduced by the "using an...
Argyrios Kyrtzidis [Fri, 20 Aug 2010 23:35:55 +0000 (23:35 +0000)]
Fix an issue with writing to PCH another included PCH, introduced by the "using an AST on-disk hash table for name lookup" commit.

When including a PCH and later re-emitting to another PCH, the name lookup tables of DeclContexts
may be incomplete, since we now lazily deserialize the visible decls of a particular name.
Fix the issue by iterating over the un-deserialized visible decls and completing the lookup tables
of DeclContexts before writing them out.

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

14 years agoAdd an iterator to OnDiskChainedHashTable to allow iterating over all the key/data...
Argyrios Kyrtzidis [Fri, 20 Aug 2010 23:31:11 +0000 (23:31 +0000)]
Add an iterator to OnDiskChainedHashTable to allow iterating over all the key/data pairs.

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

14 years agoRemove dead code.
Fariborz Jahanian [Fri, 20 Aug 2010 23:02:01 +0000 (23:02 +0000)]
Remove dead code.

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

14 years agoDisallow direct inclusion of avxintrin.h. Users should include immintrin.h instead...
Benjamin Kramer [Fri, 20 Aug 2010 23:00:03 +0000 (23:00 +0000)]
Disallow direct inclusion of avxintrin.h. Users should include immintrin.h instead. This matches GCC's behavior.

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

14 years agoCreateTemporaryType doesn't needs its Context argument.
Dan Gohman [Fri, 20 Aug 2010 22:39:57 +0000 (22:39 +0000)]
CreateTemporaryType doesn't needs its Context argument.

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

14 years agoIntroduce a new temporary MDNode concept. Temporary MDNodes are
Dan Gohman [Fri, 20 Aug 2010 22:02:57 +0000 (22:02 +0000)]
Introduce a new temporary MDNode concept. Temporary MDNodes are
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.

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

14 years agoRmove dead code.
Fariborz Jahanian [Fri, 20 Aug 2010 21:45:03 +0000 (21:45 +0000)]
Rmove dead code.

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

14 years agoobjective-c ivar refactoring patch. Iterations
Fariborz Jahanian [Fri, 20 Aug 2010 21:21:08 +0000 (21:21 +0000)]
objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.

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

14 years agoAdd a workaround for PR7947, a crash trying to recover from invalid C++ code.
Nick Lewycky [Fri, 20 Aug 2010 20:54:15 +0000 (20:54 +0000)]
Add a workaround for PR7947, a crash trying to recover from invalid C++ code.

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

14 years agoAdd a comment.
Dan Gohman [Fri, 20 Aug 2010 20:37:16 +0000 (20:37 +0000)]
Add a comment.

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

14 years agoAnother step in the process of making the parser depend on Sema:
John McCall [Fri, 20 Aug 2010 18:27:03 +0000 (18:27 +0000)]
Another step in the process of making the parser depend on Sema:
  - move DeclSpec &c into the Sema library
  - move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.

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

14 years agoAdd immintrin meta header.
Benjamin Kramer [Fri, 20 Aug 2010 18:04:07 +0000 (18:04 +0000)]
Add immintrin meta header.

- This is the official way to get AVX intrinsics, we might want to disallow
  direct inclusion of avxintrin.h, just like GCC does.

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

14 years agoalphabeticalize
Chris Lattner [Fri, 20 Aug 2010 17:24:02 +0000 (17:24 +0000)]
alphabeticalize

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

14 years agohopefully unbreak the msvc buildbot.
Chris Lattner [Fri, 20 Aug 2010 17:23:33 +0000 (17:23 +0000)]
hopefully unbreak the msvc buildbot.

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

14 years agoFix a major regression with value-initialization of class types with
Douglas Gregor [Fri, 20 Aug 2010 16:57:37 +0000 (16:57 +0000)]
Fix a major regression with value-initialization of class types with
trivial default constructors. We're weren't zero-initializing them,
which manifested as <rdar://problem/8320532> (a regression in the GCC
test suite) and is likely to have caused significant other breakage.

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