]> granicus.if.org Git - clang/log
clang
14 years agodisable these dirs which rely on dynamic linking on mingw/cygwin
Chris Lattner [Sun, 7 Mar 2010 00:17:28 +0000 (00:17 +0000)]
disable these dirs which rely on dynamic linking on mingw/cygwin

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

14 years agoadd mblaze target support, patch by Wesley Peck!
Chris Lattner [Sat, 6 Mar 2010 21:21:27 +0000 (21:21 +0000)]
add mblaze target support, patch by Wesley Peck!

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

14 years agoon both the mac and linux, /usr/local/include is treated
Chris Lattner [Sat, 6 Mar 2010 19:38:10 +0000 (19:38 +0000)]
on both the mac and linux, /usr/local/include is treated
as a "C++ Friendly" system header directory.  This fixes
PR6523.

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

14 years agoRename the new Iterator objects and raise an assertion instead of returning invalid...
Benjamin Kramer [Sat, 6 Mar 2010 15:38:03 +0000 (15:38 +0000)]
Rename the new Iterator objects and raise an assertion instead of returning invalid objects when the key is out of range.

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

14 years agoUpdate the python bindings for recent changes in the CIndex API.
Benjamin Kramer [Sat, 6 Mar 2010 14:53:07 +0000 (14:53 +0000)]
Update the python bindings for recent changes in the CIndex API.

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

14 years agoLowercase for consistency
Kovarththanan Rajaratnam [Sat, 6 Mar 2010 12:07:48 +0000 (12:07 +0000)]
Lowercase for consistency

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

14 years agoFix _MM_FROUND_NEARBYINT and move rounding intrinsics to macros.
Eric Christopher [Sat, 6 Mar 2010 10:31:44 +0000 (10:31 +0000)]
Fix _MM_FROUND_NEARBYINT and move rounding intrinsics to macros.

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

14 years agoAdd a message to these asserts.
Benjamin Kramer [Sat, 6 Mar 2010 09:07:19 +0000 (09:07 +0000)]
Add a message to these asserts.

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

14 years agoUse static method in GlobalValue
Rafael Espindola [Sat, 6 Mar 2010 07:35:18 +0000 (07:35 +0000)]
Use static method in GlobalValue

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

14 years agoPR6515: Implement __builtin_signbit and friends.
Eli Friedman [Sat, 6 Mar 2010 02:17:52 +0000 (02:17 +0000)]
PR6515: Implement __builtin_signbit and friends.

I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.

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

14 years agoAllow use of byref (__block attributed) arrays inside
Fariborz Jahanian [Sat, 6 Mar 2010 01:58:53 +0000 (01:58 +0000)]
Allow use of byref (__block attributed) arrays inside
the block. Fixes radar 7671883.

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

14 years agoImplement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),
John McCall [Sat, 6 Mar 2010 00:35:14 +0000 (00:35 +0000)]
Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),
and ARM.  Implement __builtin_init_dwarf_reg_size_table for i386 (both) and
x86-64 (all).

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

14 years agoWhen declaring a catch block in C++, make sure that the type being
Douglas Gregor [Fri, 5 Mar 2010 23:38:39 +0000 (23:38 +0000)]
When declaring a catch block in C++, make sure that the type being
caught can be copy-initialized and destructed. Fixes PR6518.

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

14 years agoAugment __has_feature to report that Clang supports adding attribute 'unused'
Ted Kremenek [Fri, 5 Mar 2010 22:43:32 +0000 (22:43 +0000)]
Augment __has_feature to report that Clang supports adding attribute 'unused'
to an Objective-C instance variable.

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

14 years agoCheck if 'Unit' is NULL before trying to iterate over the diagnostics.
Ted Kremenek [Fri, 5 Mar 2010 22:43:29 +0000 (22:43 +0000)]
Check if 'Unit' is NULL before trying to iterate over the diagnostics.
This obviates a null dereference that can occur when 'NumErrors'
is not zero.

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

14 years agoAdd clang version to crashtracer string.
Ted Kremenek [Fri, 5 Mar 2010 22:43:25 +0000 (22:43 +0000)]
Add clang version to crashtracer string.

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

14 years agoPatch to build qualifier on objective-c
Fariborz Jahanian [Fri, 5 Mar 2010 22:42:55 +0000 (22:42 +0000)]
Patch to build qualifier on objective-c
pointer types. Fixes radar 7626768.

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

14 years agoThe Windows build is just too weird; there's no real cost to doing the concurrency...
Douglas Gregor [Fri, 5 Mar 2010 22:19:41 +0000 (22:19 +0000)]
The Windows build is just too weird; there's no real cost to doing the concurrency checks for ASTUnit in all builds

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

14 years agoSwitch from NDEBUG to _DEBUG, since our Windows build is funny
Douglas Gregor [Fri, 5 Mar 2010 21:48:53 +0000 (21:48 +0000)]
Switch from NDEBUG to _DEBUG, since our Windows build is funny

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

14 years agoOnly make __ptr64 and __w64 keywords when Microsoft extensions are enabled.
Douglas Gregor [Fri, 5 Mar 2010 21:39:18 +0000 (21:39 +0000)]
Only make __ptr64 and __w64 keywords when Microsoft extensions are enabled.

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

14 years agoA little hack to identify unwanted concurrency in CIndex
Douglas Gregor [Fri, 5 Mar 2010 21:16:25 +0000 (21:16 +0000)]
A little hack to identify unwanted concurrency in CIndex

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

14 years agoEmit warning on indirect goto that potentially violates
Chris Lattner [Fri, 5 Mar 2010 20:38:02 +0000 (20:38 +0000)]
Emit warning on indirect goto that potentially violates
scope instead of error, PR6517

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

14 years agoaddress PR6502 by downgrading the scope checker's address
Chris Lattner [Fri, 5 Mar 2010 19:26:49 +0000 (19:26 +0000)]
address PR6502 by downgrading the scope checker's address
of label error to a warning controllable with a -W flag.

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

14 years agoUse clang::io::Emit8
Kovarththanan Rajaratnam [Fri, 5 Mar 2010 15:40:54 +0000 (15:40 +0000)]
Use clang::io::Emit8

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

14 years agoMake sure the raw_string_ostream gets flushed so we don't accidentally return an...
Benjamin Kramer [Fri, 5 Mar 2010 15:39:20 +0000 (15:39 +0000)]
Make sure the raw_string_ostream gets flushed so we don't accidentally return an empty string.

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

14 years agoRemove reference to AnalysisContext in Environment. We already have LocationContext
Zhongxing Xu [Fri, 5 Mar 2010 04:45:36 +0000 (04:45 +0000)]
Remove reference to AnalysisContext in Environment. We already have LocationContext
information in ExplodedNode.

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

14 years agoRemove header file dependencies in block patch
Fariborz Jahanian [Fri, 5 Mar 2010 01:49:18 +0000 (01:49 +0000)]
Remove header file dependencies in block patch
test case.

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

14 years agoadd support for a 1<<29 bit in the block flags field to mark blocks using alternate...
Blaine Garst [Fri, 5 Mar 2010 01:29:59 +0000 (01:29 +0000)]
add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI

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

14 years agoDon't produce an alias for a destructor if the target is weak.
Rafael Espindola [Fri, 5 Mar 2010 01:21:10 +0000 (01:21 +0000)]
Don't produce an alias for a destructor if the target is weak.

This fixes bootstrap on ELF systems :-)

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

14 years agoWhen we invalidate a declaration, make it public, so that it doesn't
Douglas Gregor [Fri, 5 Mar 2010 00:26:45 +0000 (00:26 +0000)]
When we invalidate a declaration, make it public, so that it doesn't
trigger access control or one of the many assertions we have for valid
access specifiers.

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

14 years agoMake rewritten source compiled with clang++.
Fariborz Jahanian [Thu, 4 Mar 2010 23:13:29 +0000 (23:13 +0000)]
Make rewritten source compiled with clang++.

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

14 years agoMake rewritten source compiled with clang++ for correctness.
Fariborz Jahanian [Thu, 4 Mar 2010 23:03:49 +0000 (23:03 +0000)]
Make rewritten source compiled with clang++ for correctness.

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

14 years agoChange test to compile rewritten test with clang++.
Fariborz Jahanian [Thu, 4 Mar 2010 21:57:21 +0000 (21:57 +0000)]
Change test to compile rewritten test with clang++.

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

14 years agoPatch to get around a rewriter bug rewriting storage class
Fariborz Jahanian [Thu, 4 Mar 2010 21:35:37 +0000 (21:35 +0000)]
Patch to get around a rewriter bug rewriting storage class
on a block API struct definition.

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

14 years agoreally fix 6473 by handling weakref in constant expressions.
Rafael Espindola [Thu, 4 Mar 2010 21:26:03 +0000 (21:26 +0000)]
really fix 6473 by handling weakref in constant expressions.

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

14 years agoadd TCE target support, patch by Pekka J!
Chris Lattner [Thu, 4 Mar 2010 21:07:38 +0000 (21:07 +0000)]
add TCE target support, patch by Pekka J!

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

14 years agoUse LLVM's new DESTDIR-less PROJ_* variables.
Erick Tryzelaar [Thu, 4 Mar 2010 20:57:19 +0000 (20:57 +0000)]
Use LLVM's new DESTDIR-less PROJ_* variables.

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

14 years agoc-index-test's printing of linkage was completely broken, as was the
Douglas Gregor [Thu, 4 Mar 2010 19:36:27 +0000 (19:36 +0000)]
c-index-test's printing of linkage was completely broken, as was the
test of this functionality. The API worked great, though! :)

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

14 years agoFixes a bug whereby static const block var has static
Fariborz Jahanian [Thu, 4 Mar 2010 18:54:29 +0000 (18:54 +0000)]
Fixes a bug whereby static const block var has static
moved incorrectly. (radar 7714443).

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

14 years agoFix PR6473.
Rafael Espindola [Thu, 4 Mar 2010 18:17:24 +0000 (18:17 +0000)]
Fix PR6473.

Clang's support for weakref is now better than llvm-gcc's :-)

We don't introduce a new symbol and we correctly mark undefined references weak only if there is no
definition or regular undefined references in the same file.

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

14 years agoSteal the TARGET lit condition from the LLVM test suite.
John McCall [Thu, 4 Mar 2010 09:38:07 +0000 (09:38 +0000)]
Steal the TARGET lit condition from the LLVM test suite.

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

14 years agoThe FIXME is fixed.
Zhongxing Xu [Thu, 4 Mar 2010 09:05:58 +0000 (09:05 +0000)]
The FIXME is fixed.

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

14 years agoWhen profiling Environment, also profile with AnalysisContext*, bacause
Zhongxing Xu [Thu, 4 Mar 2010 09:04:52 +0000 (09:04 +0000)]
When profiling Environment, also profile with AnalysisContext*, bacause
we now may have identical states with different analysis context.

Set the right AnalysisContext in state when entering and leaving a callee.

With both of the above changes, we can pass the test case.

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

14 years agoRevert changes r97693, r97700, and r97718.
John McCall [Thu, 4 Mar 2010 04:29:44 +0000 (04:29 +0000)]
Revert changes r97693, r97700, and r97718.

Our testing framework can't deal with disabled targets yet.

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

14 years agoXFAIL these tests on win32, since the win32 buildbot apparently disables all
John McCall [Thu, 4 Mar 2010 04:14:44 +0000 (04:14 +0000)]
XFAIL these tests on win32, since the win32 buildbot apparently disables all
targets except X86.

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

14 years agoFirst start on smmintrin.h, rounding and blending.
Eric Christopher [Thu, 4 Mar 2010 02:56:19 +0000 (02:56 +0000)]
First start on smmintrin.h, rounding and blending.

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

14 years agoAdd in disabled case as well.
Eric Christopher [Thu, 4 Mar 2010 02:31:44 +0000 (02:31 +0000)]
Add in disabled case as well.

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

14 years agoAdd in -msse4.1 and -msse4.2 options and continuing a rather
Eric Christopher [Thu, 4 Mar 2010 02:26:37 +0000 (02:26 +0000)]
Add in -msse4.1 and -msse4.2 options and continuing a rather
hacky solution for translating.  Expanded on comment explaining
the hack a bit.

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

14 years agoFix __builtin_ia32_roundss and __builtin_ia32_roundsd definitions.
Eric Christopher [Thu, 4 Mar 2010 01:34:19 +0000 (01:34 +0000)]
Fix __builtin_ia32_roundss and __builtin_ia32_roundsd definitions.
Re-enable test.

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

14 years agoRefactor local class name mangling and make it
Fariborz Jahanian [Thu, 4 Mar 2010 01:02:03 +0000 (01:02 +0000)]
Refactor local class name mangling and make it
ABI conforming.

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

14 years agoImplement __builtin_dwarf_sp_column().
John McCall [Thu, 4 Mar 2010 00:44:01 +0000 (00:44 +0000)]
Implement __builtin_dwarf_sp_column().

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

14 years agofix a buildbot failure, this was passing for me because the
Chris Lattner [Thu, 4 Mar 2010 00:38:16 +0000 (00:38 +0000)]
fix a buildbot failure, this was passing for me because the
'%t' file was left around on my disk.  doh.

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

14 years agoCreate a TargetMachine whenever we create a CodeGenAction. The codegen of
John McCall [Thu, 4 Mar 2010 00:23:29 +0000 (00:23 +0000)]
Create a TargetMachine whenever we create a CodeGenAction.  The codegen of
some builtins will rely on target knowledge.

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

14 years agoReinstate r97674 with a fix for the assertion that was firing in <list>
Douglas Gregor [Wed, 3 Mar 2010 23:55:11 +0000 (23:55 +0000)]
Reinstate r97674 with a fix for the assertion that was firing in <list>

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

14 years agoRemove the linux c includes part of my last patch.
Eric Christopher [Wed, 3 Mar 2010 23:27:49 +0000 (23:27 +0000)]
Remove the linux c includes part of my last patch.

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

14 years agoRevert r97674; it's causing failures
Douglas Gregor [Wed, 3 Mar 2010 23:26:56 +0000 (23:26 +0000)]
Revert r97674; it's causing failures

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

14 years agoImplement disambiguation of base class members via a
Douglas Gregor [Wed, 3 Mar 2010 22:53:40 +0000 (22:53 +0000)]
Implement disambiguation of base class members via a
nested-name-specifier. For example, this allows member access in
diamond-shaped hierarchies like:

  struct Base {
    void Foo();
    int Member;
  };

  struct D1 : public Base {};
  struct D2 : public Base {};

  struct Derived : public D1, public D2 { }

  void Test(Derived d) {
    d.Member = 17; // error: ambiguous cast from Derived to Base
    d.D1::Member = 17; // error: okay, modify D1's Base's Member
  }

Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some
redundancy between Sema::PerformObjectMemberConversion() and
Sema::PerformObjectArgumentInitialization() -- the latter now calls
the former.

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

14 years agoFix code gen bug generating code for
Fariborz Jahanian [Wed, 3 Mar 2010 22:09:47 +0000 (22:09 +0000)]
Fix code gen bug generating code for
((id)cat)->isa. Fixes radar 7709015.

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

14 years agomerge asm-2.c into asm.c, remove asm-inout.c because it is
Chris Lattner [Wed, 3 Mar 2010 21:56:57 +0000 (21:56 +0000)]
merge asm-2.c into asm.c, remove asm-inout.c because it is
XFAIL and already tracked in bugzilla.

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

14 years agofix PR6475, we were doing side-effecting stuff in an assert.
Chris Lattner [Wed, 3 Mar 2010 21:52:23 +0000 (21:52 +0000)]
fix PR6475, we were doing side-effecting stuff in an assert.

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

14 years agoAdd in more c++ header paths for later gccs under gentoo linux.
Eric Christopher [Wed, 3 Mar 2010 21:41:50 +0000 (21:41 +0000)]
Add in more c++ header paths for later gccs under gentoo linux.
Add in c header path for various linuxes as well.

Partial patch from Christian AdÃ¥ker!

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

14 years agoImplements mangling of local class names to
Fariborz Jahanian [Wed, 3 Mar 2010 19:41:08 +0000 (19:41 +0000)]
Implements mangling of local class names to
fix a code gen crash. This is WIP as not
all ABI cases are covered (there is a FIXME to
this effect). Fixes radar 7696748.

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

14 years agoadd framework for ARM builtins, Patch by Edmund Grimley Evans!
Chris Lattner [Wed, 3 Mar 2010 19:03:45 +0000 (19:03 +0000)]
add framework for ARM builtins, Patch by Edmund Grimley Evans!

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

14 years agoSimplify code a bit and remove unneeded semicolons.
Benjamin Kramer [Wed, 3 Mar 2010 16:28:47 +0000 (16:28 +0000)]
Simplify code a bit and remove unneeded semicolons.

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

14 years agoSketch out an implementation for __builtin_dwarf_cfa. I have no idea
John McCall [Wed, 3 Mar 2010 10:30:05 +0000 (10:30 +0000)]
Sketch out an implementation for __builtin_dwarf_cfa.  I have no idea
why the front-end is calculating the argument to llvm.eh.dwarf.cfa().

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

14 years agoAdd '-test-print-linkage-source' option to c-index-test
Ted Kremenek [Wed, 3 Mar 2010 06:37:58 +0000 (06:37 +0000)]
Add '-test-print-linkage-source' option to c-index-test
to test clang_getCursorLinkage()

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

14 years agoExport clang_getCursorLinkage().
Ted Kremenek [Wed, 3 Mar 2010 06:37:30 +0000 (06:37 +0000)]
Export clang_getCursorLinkage().

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

14 years agoAdd clang_getCursorLinkage(), which returns the
Ted Kremenek [Wed, 3 Mar 2010 06:36:57 +0000 (06:36 +0000)]
Add clang_getCursorLinkage(), which returns the
underlying linkage for the entity referred to by a
CXCursor.

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

14 years agoImplement __builtin_eh_return.
John McCall [Wed, 3 Mar 2010 05:38:58 +0000 (05:38 +0000)]
Implement __builtin_eh_return.

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

14 years agoFix a bug with base offset merging that Devang noticed.
Anders Carlsson [Wed, 3 Mar 2010 04:58:02 +0000 (04:58 +0000)]
Fix a bug with base offset merging that Devang noticed.

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

14 years agoImplement name hiding for names found through virtual base subobjects
Douglas Gregor [Wed, 3 Mar 2010 04:38:46 +0000 (04:38 +0000)]
Implement name hiding for names found through virtual base subobjects
that are hidden by other derived base subobjects reached along a
lookup path that does *not* pass through the hiding subobject (C++
[class.member.lookup]p6). Fixes PR6462.

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

14 years agoAdd proper target hooks for __builtin_extract_return_address and
John McCall [Wed, 3 Mar 2010 04:15:11 +0000 (04:15 +0000)]
Add proper target hooks for __builtin_extract_return_address and
__builtin_frob_return_address.  The implementations for both are
still trivial in the default case.

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

14 years agoDon't emit derived-to-base destructor aliases if we don't have a definition
John McCall [Wed, 3 Mar 2010 03:40:11 +0000 (03:40 +0000)]
Don't emit derived-to-base destructor aliases if we don't have a definition
for the base destructor, because aliases to declarations aren't legal.

Fixes PR 6471.

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

14 years agoRefactor CXXRecordDecl::lookupInBases() to push the recursion down a
Douglas Gregor [Wed, 3 Mar 2010 02:18:00 +0000 (02:18 +0000)]
Refactor CXXRecordDecl::lookupInBases() to push the recursion down a
level. No functionality change, and it obeys access control this
time.

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

14 years agoUse SVN_REVISION, not SVN_VERSION.
Ted Kremenek [Wed, 3 Mar 2010 01:30:39 +0000 (01:30 +0000)]
Use SVN_REVISION, not SVN_VERSION.

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

14 years agoFix an algorithmic bug in LiveVariables pointed out by Zhongxing.
Ted Kremenek [Wed, 3 Mar 2010 01:17:41 +0000 (01:17 +0000)]
Fix an algorithmic bug in LiveVariables pointed out by Zhongxing.
If an initializer in a DeclStmt references the declared variable, that
extends the liveness of that variable.

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

14 years agoRevert r97618. Access control sucks
Douglas Gregor [Wed, 3 Mar 2010 01:13:25 +0000 (01:13 +0000)]
Revert r97618. Access control sucks

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

14 years agoMake getClangRevision() check that SVN_VERSION is an empty string
Ted Kremenek [Wed, 3 Mar 2010 01:02:48 +0000 (01:02 +0000)]
Make getClangRevision() check that SVN_VERSION is an empty string
(even if it is defined).  This fixes the issue of this function
returning '0' when SVN_VERSION is defined to be "".

Fixes: <rdar://problem/7663667>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97620 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comments to test case.
Zhongxing Xu [Wed, 3 Mar 2010 01:02:48 +0000 (01:02 +0000)]
Add comments to test case.

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

14 years agoFactor out the recursive lookup into C++ base classes into a separate,
Douglas Gregor [Wed, 3 Mar 2010 01:02:31 +0000 (01:02 +0000)]
Factor out the recursive lookup into C++ base classes into a separate,
static function. No functionality change.

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

14 years agoInitialize your storage, dummy
Douglas Gregor [Wed, 3 Mar 2010 00:29:43 +0000 (00:29 +0000)]
Initialize your storage, dummy

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

14 years agoDon't use echo in the Index test, which I hope will work around an intermittent Windo...
Douglas Gregor [Wed, 3 Mar 2010 00:03:22 +0000 (00:03 +0000)]
Don't use echo in the Index test, which I hope will work around an intermittent Windows failure

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

14 years agoEliminate the static map of overridden C++ methods, which was going to
Douglas Gregor [Tue, 2 Mar 2010 23:58:15 +0000 (23:58 +0000)]
Eliminate the static map of overridden C++ methods, which was going to
come back to bite us at some point.

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

14 years agoSuppress implicit member redeclarations arising from explicit instantiation
John McCall [Tue, 2 Mar 2010 23:09:38 +0000 (23:09 +0000)]
Suppress implicit member redeclarations arising from explicit instantiation
declarations after the member has been explicitly specialized.  We already
did this after explicit instantiation definitions;  not doing it for
declarations meant that subsequent definitions would see a previous
member declaration with specialization kind "explicit instantiation decl",
which would then happily get overridden.

Fixes PR 6458.

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

14 years ago[CFG]
Ted Kremenek [Tue, 2 Mar 2010 21:43:54 +0000 (21:43 +0000)]
[CFG]

After discussion with Zhongxing, don't force the initializer of DeclStmts to be
block-level expressions.

This led to some interesting fallout:

[UninitializedValues]

Always visit the initializer of DeclStmts (do not assume they are block-level expressions).

[BasicStore]

With initializers of DeclStmts no longer block-level expressions, this causes self-referencing initializers (e.g. 'int x = x') to no longer cause the initialized variable to be live before the DeclStmt.  While this is correct, it caused BasicStore::RemoveDeadBindings() to prune off the values of these variables from the initial store (where they are set to uninitialized).  The fix is to back-port some (and only some) of the lazy-binding logic from RegionStore to
BasicStore.  Now the default values of local variables are determined lazily as opposed
to explicitly initialized.

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

14 years agoDon't conjure a symbol for DeclStmts when the variable is a C++ reference.
Ted Kremenek [Tue, 2 Mar 2010 21:43:52 +0000 (21:43 +0000)]
Don't conjure a symbol for DeclStmts when the variable is a C++ reference.

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

14 years agoDuring codegen assert that any copy assignment, destructor or constructor that
Rafael Espindola [Tue, 2 Mar 2010 21:28:26 +0000 (21:28 +0000)]
During codegen assert that any copy assignment, destructor or constructor that
we need to synthesize has been marked as used by Sema.

Change Sema to avoid these asserts.

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

14 years agoBump the default maximum template-instantiation depth to 500, as in
Douglas Gregor [Tue, 2 Mar 2010 19:14:36 +0000 (19:14 +0000)]
Bump the default maximum template-instantiation depth to 500, as in
GCC. Fixes PR6301.

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

14 years agoAdd test case from PR6064, which now works
Douglas Gregor [Tue, 2 Mar 2010 18:48:07 +0000 (18:48 +0000)]
Add test case from PR6064, which now works

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

14 years agoDiagnose the declaration of enum templates. Also, be a bit more
Douglas Gregor [Tue, 2 Mar 2010 17:53:14 +0000 (17:53 +0000)]
Diagnose the declaration of enum templates. Also, be a bit more
careful about value-dependent enumerators. Fixes PR5786.

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

14 years agoMove Emit24 to clang::io
Kovarththanan Rajaratnam [Tue, 2 Mar 2010 17:41:26 +0000 (17:41 +0000)]
Move Emit24 to clang::io

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

14 years agoUse CXXTemporaryObjectExpr for explicitly-constructed temporaries. We
Douglas Gregor [Tue, 2 Mar 2010 17:18:33 +0000 (17:18 +0000)]
Use CXXTemporaryObjectExpr for explicitly-constructed temporaries. We
used to do this, but it got lost when we switched functional-style
cast syntax over to using the new initialization code. Fixes PR6457.

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

14 years agoPass -m32 and -m64 to the static analyzer when using scan-build. Now we can
Charles Davis [Tue, 2 Mar 2010 15:26:41 +0000 (15:26 +0000)]
Pass -m32 and -m64 to the static analyzer when using scan-build. Now we can
use scan-build with Wine, for example.

Ted, I hope this is OK.

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

14 years agoRegister all parameters even if they didn't occur in the function body.
Zhongxing Xu [Tue, 2 Mar 2010 10:08:30 +0000 (10:08 +0000)]
Register all parameters even if they didn't occur in the function body.
We may query their liveness because they are added to store when passing
argument values.

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

14 years agoUnify initializer-instantiation code for variable declarations and
Douglas Gregor [Tue, 2 Mar 2010 07:38:39 +0000 (07:38 +0000)]
Unify initializer-instantiation code for variable declarations and
base/member initializers.

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

14 years agoSimplify code.
Anders Carlsson [Tue, 2 Mar 2010 05:40:45 +0000 (05:40 +0000)]
Simplify code.

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

14 years agoInspired by seeing "MIPS" go by in the commits, I've gone ahead and
John McCall [Tue, 2 Mar 2010 03:50:12 +0000 (03:50 +0000)]
Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word;  this
comports with typical usage (i.e. the one use I know of).

I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).

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

14 years agoRename BaseOffset to Offset and make it signed in preparation of more construction...
Anders Carlsson [Tue, 2 Mar 2010 03:44:06 +0000 (03:44 +0000)]
Rename BaseOffset to Offset and make it signed in preparation of more construction vtable work.

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

14 years agoAdd in some more MIPS command line options.
Eric Christopher [Tue, 2 Mar 2010 02:41:08 +0000 (02:41 +0000)]
Add in some more MIPS command line options.

Patch by Oleksandr Tymoshenko!

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

14 years agoAfter much consultation aimed at figuring out what this builtin actually
John McCall [Tue, 2 Mar 2010 02:31:24 +0000 (02:31 +0000)]
After much consultation aimed at figuring out what this builtin actually
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.

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