]> granicus.if.org Git - clang/log
clang
14 years agoAdd rudimentary support for member pointers to CGDebugInfo.
Anders Carlsson [Sun, 6 Dec 2009 18:00:51 +0000 (18:00 +0000)]
Add rudimentary support for member pointers to CGDebugInfo.

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

14 years agoremove some extraneous syntax: sourceloc implicitly converts to sourcerange.
Chris Lattner [Sun, 6 Dec 2009 17:36:05 +0000 (17:36 +0000)]
remove some extraneous syntax: sourceloc implicitly converts to sourcerange.

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

14 years agouse new helpers to simplify code.
Chris Lattner [Sun, 6 Dec 2009 17:22:42 +0000 (17:22 +0000)]
use new helpers to simplify code.

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

14 years agoAdd test case for mktemp. Patch by Lei Zhang.
Zhongxing Xu [Sun, 6 Dec 2009 12:45:46 +0000 (12:45 +0000)]
Add test case for mktemp. Patch by Lei Zhang.

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

14 years agoDrop Preprocessor/open-failure test, it breaks running the test suite as root,
Daniel Dunbar [Sun, 6 Dec 2009 10:07:46 +0000 (10:07 +0000)]
Drop Preprocessor/open-failure test, it breaks running the test suite as root,
and I can't figure out how to write it more portably.

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

14 years agoDocument that CompilerInvocation::createDiagnostics keeps a reference to the Diagnost...
Daniel Dunbar [Sun, 6 Dec 2009 09:56:30 +0000 (09:56 +0000)]
Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.

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

14 years agoFix an off by one in findEndOfWord, which could scan past the end of the string in...
Daniel Dunbar [Sun, 6 Dec 2009 09:56:18 +0000 (09:56 +0000)]
Fix an off by one in findEndOfWord, which could scan past the end of the string in a corner case.

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

14 years agoFix a slight oversight in computing whether a copy constructor is elidable.
Eli Friedman [Sun, 6 Dec 2009 09:26:33 +0000 (09:26 +0000)]
Fix a slight oversight in computing whether a copy constructor is elidable.
Fixes PR5695.

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

14 years agoUnbreak and add test case for r90276, a situation in which getBuffer is expected...
Daniel Dunbar [Sun, 6 Dec 2009 09:19:25 +0000 (09:19 +0000)]
Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.

Also, update SourceManager.h doxyments for getBuffer() to reflect reality.

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

14 years agoChange Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should...
Daniel Dunbar [Sun, 6 Dec 2009 09:19:12 +0000 (09:19 +0000)]
Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions.

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

14 years agoAdd a pretty horrible hack to prevent clang from crashing with inconsistent PCH
Daniel Dunbar [Sun, 6 Dec 2009 05:43:36 +0000 (05:43 +0000)]
Add a pretty horrible hack to prevent clang from crashing with inconsistent PCH
files.
 - The issue is that PCH uses a stat cache, which may reference files which have
   been deleted or moved. In such cases ContentCache::getBuffer was returning 0
   but most clients are incapable of dealing with this (i.e., they don't).

   For the time being, resolve this issue by just making up some invalid file
   contents and. Eventually we should detect that we are in an inconsistent
   situation and error out with a nice message that the PCH is out of date.

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Sun, 6 Dec 2009 01:52:22 +0000 (01:52 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=86026

Note: The 'improved debugging' changes weren't integrated (since they were later reverted, since they didn't improve debugging).

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Sun, 6 Dec 2009 01:48:44 +0000 (01:48 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=82174

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Sun, 6 Dec 2009 01:33:56 +0000 (01:33 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=72893

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

14 years agoSet the correct linkage for VTTs as well.
Anders Carlsson [Sun, 6 Dec 2009 01:09:21 +0000 (01:09 +0000)]
Set the correct linkage for VTTs as well.

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Sun, 6 Dec 2009 01:02:14 +0000 (01:02 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71473

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

14 years agoMore linkage improvements.
Anders Carlsson [Sun, 6 Dec 2009 00:53:22 +0000 (00:53 +0000)]
More linkage improvements.

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

14 years agoPass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtua...
Anders Carlsson [Sun, 6 Dec 2009 00:23:49 +0000 (00:23 +0000)]
Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.

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

14 years agoMake GenerateVtable a private member function of CGVtableInfo.
Anders Carlsson [Sun, 6 Dec 2009 00:01:05 +0000 (00:01 +0000)]
Make GenerateVtable a private member function of CGVtableInfo.

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

14 years agoFix for PR5693: shift some code into SetClassDeclAttributesFromBase so that
Eli Friedman [Sat, 5 Dec 2009 23:03:49 +0000 (23:03 +0000)]
Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so that
it gets called during template instantiation.

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

14 years agoOnly emit the vtable definition if the class has a key function and we're emitting...
Anders Carlsson [Sat, 5 Dec 2009 22:42:54 +0000 (22:42 +0000)]
Only emit the vtable definition if the class has a key function and we're emitting it, or if the class doesn't have a key function and we are emitting the complete constructor.

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

14 years agoIf a class does not have a key function, its linkage should be weak_odr.
Anders Carlsson [Sat, 5 Dec 2009 22:24:38 +0000 (22:24 +0000)]
If a class does not have a key function, its linkage should be weak_odr.

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

14 years agoUse createGlobalVariable for creating vtable variables too.
Anders Carlsson [Sat, 5 Dec 2009 22:19:10 +0000 (22:19 +0000)]
Use createGlobalVariable for creating vtable variables too.

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

14 years agoDon't call back() on an empty vector.
Benjamin Kramer [Sat, 5 Dec 2009 22:16:51 +0000 (22:16 +0000)]
Don't call back() on an empty vector.

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Sat, 5 Dec 2009 21:43:12 +0000 (21:43 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71225
http://llvm.org/viewvc/llvm-project?view=rev&revision=73207
http://llvm.org/viewvc/llvm-project?view=rev&revision=73414

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

14 years agoCodeGenModule::GenerateVtable now returns a pointer directly to the vtable and not...
Anders Carlsson [Sat, 5 Dec 2009 21:28:12 +0000 (21:28 +0000)]
CodeGenModule::GenerateVtable now returns a pointer directly to the vtable and not to the address point.

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

14 years agoMake sure that hte vtable always has an i8* array type.
Anders Carlsson [Sat, 5 Dec 2009 21:09:05 +0000 (21:09 +0000)]
Make sure that hte vtable always has an i8* array type.

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

14 years agoAdd a function for getting the vtable address point of a class.
Anders Carlsson [Sat, 5 Dec 2009 21:03:56 +0000 (21:03 +0000)]
Add a function for getting the vtable address point of a class.

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

14 years agoSimplify BuildVTT.
Anders Carlsson [Sat, 5 Dec 2009 21:02:25 +0000 (21:02 +0000)]
Simplify BuildVTT.

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

14 years agoLet the VTT builder pretend that getVtable returns a pointer to the vtable and not...
Anders Carlsson [Sat, 5 Dec 2009 20:58:49 +0000 (20:58 +0000)]
Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point.

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

14 years agoChange getCtorVtable to not return the address point offset, but the global variable.
Anders Carlsson [Sat, 5 Dec 2009 20:42:53 +0000 (20:42 +0000)]
Change getCtorVtable to not return the address point offset, but the global variable.

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

14 years agoSimplify some code.
Anders Carlsson [Sat, 5 Dec 2009 18:38:15 +0000 (18:38 +0000)]
Simplify some code.

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

14 years agoFactor vtable related GlobalVariable creation out into a separate function. Add vtabl...
Anders Carlsson [Sat, 5 Dec 2009 17:04:47 +0000 (17:04 +0000)]
Factor vtable related GlobalVariable creation out into a separate function. Add vtable linkage test.

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

14 years agoUpdate .xcodeproj file
Anders Carlsson [Sat, 5 Dec 2009 16:07:02 +0000 (16:07 +0000)]
Update .xcodeproj file

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Sat, 5 Dec 2009 15:55:59 +0000 (15:55 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71086
http://llvm.org/viewvc/llvm-project?view=rev&revision=71107

Note: This fixes <rdar://problem/6845623> from protocol to template.

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

14 years agoRemove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view...
Steve Naroff [Sat, 5 Dec 2009 12:23:07 +0000 (12:23 +0000)]
Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642).

Simply use the 'LangOpts' member already present in TextDiagnosticPrinter.

Sorry for the confusion!

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

14 years agoAvoid trashing two temporary strings.
Benjamin Kramer [Sat, 5 Dec 2009 10:22:15 +0000 (10:22 +0000)]
Avoid trashing two temporary strings.

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

14 years agostrcasecmp is unportable.
Benjamin Kramer [Sat, 5 Dec 2009 10:07:04 +0000 (10:07 +0000)]
strcasecmp is unportable.

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

14 years agoImprove the performance of code completion by 2.2x when completing for ordinary names...
Douglas Gregor [Sat, 5 Dec 2009 09:08:56 +0000 (09:08 +0000)]
Improve the performance of code completion by 2.2x when completing for ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting.

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

14 years agofix comment.
Chris Lattner [Sat, 5 Dec 2009 08:33:21 +0000 (08:33 +0000)]
fix comment.

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

14 years agoconsolidate some tests.
Chris Lattner [Sat, 5 Dec 2009 08:30:04 +0000 (08:30 +0000)]
consolidate some tests.

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

14 years agoimplement rdar://7346691 by codegen'ing struct/array initializers
Chris Lattner [Sat, 5 Dec 2009 08:22:11 +0000 (08:22 +0000)]
implement rdar://7346691 by codegen'ing struct/array initializers
to a memset or a memcpy from a global when possible.

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

14 years agovarious cleanups.
Chris Lattner [Sat, 5 Dec 2009 08:21:30 +0000 (08:21 +0000)]
various cleanups.

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

14 years agosimplify a condition and add a testcase.
Chris Lattner [Sat, 5 Dec 2009 06:49:57 +0000 (06:49 +0000)]
simplify a condition and add a testcase.

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

14 years agofix rdar://7446395, a crash on invalid, by fixing a broken assertion.
Chris Lattner [Sat, 5 Dec 2009 05:40:13 +0000 (05:40 +0000)]
fix rdar://7446395, a crash on invalid, by fixing a broken assertion.

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

14 years agoTweak "key function" rules so that they work for templates with virtual
Eli Friedman [Sat, 5 Dec 2009 04:55:55 +0000 (04:55 +0000)]
Tweak "key function" rules so that they work for templates with virtual
inline functions.

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

14 years agoCIndex: For the time being, don't return translation units if we encounter an error...
Daniel Dunbar [Sat, 5 Dec 2009 02:17:18 +0000 (02:17 +0000)]
CIndex: For the time being, don't return translation units if we encounter an error during parsing.
 - We need to be more careful in the rest of CIndex if we are to handle
   possibly-invalid ASTs, and don't have much experience with this yet.

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Sat, 5 Dec 2009 02:14:08 +0000 (02:14 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71086

Note - This commit only includes the fix for:

<rdar://problem/6309338> slightly different error message format for Visual Studio.

The fix for <rdar://problem/6845623> from protocol to template. is separate/forthcoming.

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

14 years agoSkip actually generating the vtable unless we are defining it. This avoids
Eli Friedman [Sat, 5 Dec 2009 01:05:03 +0000 (01:05 +0000)]
Skip actually generating the vtable unless we are defining it.  This avoids
the side-effects of generating the methods in the vtable (including PR5676).

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

14 years agoUnbreak -ccc-cxx and -ccc-clang-cxx defaulting.
Daniel Dunbar [Sat, 5 Dec 2009 00:13:59 +0000 (00:13 +0000)]
Unbreak -ccc-cxx and -ccc-clang-cxx defaulting.

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

14 years agoDon't emit explicit specializations of static member variable declarations.
Anders Carlsson [Fri, 4 Dec 2009 23:50:01 +0000 (23:50 +0000)]
Don't emit explicit specializations of static member variable declarations.

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

14 years agoAdd support for function try blocks.
Mike Stump [Fri, 4 Dec 2009 23:26:17 +0000 (23:26 +0000)]
Add support for function try blocks.

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

14 years agoFix "using typename" and the instantiation of non-dependent using declarations.
John McCall [Fri, 4 Dec 2009 22:46:56 +0000 (22:46 +0000)]
Fix "using typename" and the instantiation of non-dependent using declarations.

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

14 years agoReturn bool as a bool instead of a uint64_t.
Benjamin Kramer [Fri, 4 Dec 2009 22:45:27 +0000 (22:45 +0000)]
Return bool as a bool instead of a uint64_t.

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

14 years agoBe a little more clever about inline member functions that are marked inline in the...
Anders Carlsson [Fri, 4 Dec 2009 22:35:50 +0000 (22:35 +0000)]
Be a little more clever about inline member functions that are marked inline in the inline class declaration but not in the actual definition:

class A {
  inline void f();
}

void A::f() { }

This is not the most ideal solution, since it doesn't work 100% with regular functions (as my FIXME comment states).

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

14 years agoForgot this.
Anders Carlsson [Fri, 4 Dec 2009 22:34:07 +0000 (22:34 +0000)]
Forgot this.

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

14 years agoDiagnose declarations of implicit member functions.
Anders Carlsson [Fri, 4 Dec 2009 22:33:25 +0000 (22:33 +0000)]
Diagnose declarations of implicit member functions.

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

14 years agoAdd an easy accessor for the end of the try/catch statement.
Mike Stump [Fri, 4 Dec 2009 22:22:32 +0000 (22:22 +0000)]
Add an easy accessor for the end of the try/catch statement.

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

14 years agoDriver: Switch -ccc-* options to using the standard options functionality.
Daniel Dunbar [Fri, 4 Dec 2009 21:55:23 +0000 (21:55 +0000)]
Driver: Switch -ccc-* options to using the standard options functionality.
 - I still want to get rid of them, but manually handling them isn't adding value.

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

14 years agoFix for PR5650 - Revised vector_size attribute handling to be done earlier before...
John Thompson [Fri, 4 Dec 2009 21:51:28 +0000 (21:51 +0000)]
Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized.

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Fri, 4 Dec 2009 21:36:32 +0000 (21:36 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=70978

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Fri, 4 Dec 2009 21:29:41 +0000 (21:29 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=70926

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Fri, 4 Dec 2009 21:18:19 +0000 (21:18 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=70922

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

14 years agoPut in FIXME that this mangling is not official in.
Sean Hunt [Fri, 4 Dec 2009 21:11:13 +0000 (21:11 +0000)]
Put in FIXME that this mangling is not official in.

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

14 years agoOptTable: Allow option groups to be used to define "help groups", which will
Daniel Dunbar [Fri, 4 Dec 2009 21:08:40 +0000 (21:08 +0000)]
OptTable: Allow option groups to be used to define "help groups", which will
collate the options inside that group.

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

14 years agoOptParser: Add HelpHidden flag.
Daniel Dunbar [Fri, 4 Dec 2009 21:08:25 +0000 (21:08 +0000)]
OptParser: Add HelpHidden flag.

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

14 years agoSwitch mangling of literal operator names to a string that's
Sean Hunt [Fri, 4 Dec 2009 21:01:37 +0000 (21:01 +0000)]
Switch mangling of literal operator names to a string that's
 a) legal
 b) likely to be chosen as the official mangling

This will break ABI compatibility with all literal operator names,
so you may need to recompile any such code. Sorry.

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

14 years agoBe sure to instantiate rtti for non-polymorphic bases.
Mike Stump [Fri, 4 Dec 2009 20:55:13 +0000 (20:55 +0000)]
Be sure to instantiate rtti for non-polymorphic bases.

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

14 years agoTeach AnalysisContext::getBody() about BlockDecls.
Ted Kremenek [Fri, 4 Dec 2009 20:34:55 +0000 (20:34 +0000)]
Teach AnalysisContext::getBody() about BlockDecls.

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

14 years agoTeach 'ExecutionContinues' (part of BugReporter's diagnostic generation) about BlockD...
Ted Kremenek [Fri, 4 Dec 2009 20:34:31 +0000 (20:34 +0000)]
Teach 'ExecutionContinues' (part of BugReporter's diagnostic generation) about BlockDecls.

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

14 years agoInclude BlockDeclRefExprs in constructed CFGs.
Ted Kremenek [Fri, 4 Dec 2009 20:33:25 +0000 (20:33 +0000)]
Include BlockDeclRefExprs in constructed CFGs.

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

14 years agoReplace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).
Ted Kremenek [Fri, 4 Dec 2009 20:32:20 +0000 (20:32 +0000)]
Replace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).

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

14 years agoWhen generating a virtual destructor, don't try to make a virtual call to the base...
Anders Carlsson [Fri, 4 Dec 2009 19:33:17 +0000 (19:33 +0000)]
When generating a virtual destructor, don't try to make a virtual call to the base class destructor because then we'll just re-enter the same destructor!

This was done to fix PR5619, so I went ahead and passed a dummy VTT pointer for now.

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

14 years agoAdd gcc's -no-canonical-prefixes option to clang.
Rafael Espindola [Fri, 4 Dec 2009 19:31:58 +0000 (19:31 +0000)]
Add gcc's -no-canonical-prefixes option to clang.

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

14 years agoFixup nested try blocks.
Mike Stump [Fri, 4 Dec 2009 19:21:57 +0000 (19:21 +0000)]
Fixup nested try blocks.

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

14 years agoFix warning and be sure to set up the rethrow pointer if we fall off
Mike Stump [Fri, 4 Dec 2009 19:03:47 +0000 (19:03 +0000)]
Fix warning and be sure to set up the rethrow pointer if we fall off
the end of all the catches.

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

14 years agoRename 'Class' to 'MostDerivedClass'
Anders Carlsson [Fri, 4 Dec 2009 18:36:22 +0000 (18:36 +0000)]
Rename 'Class' to 'MostDerivedClass'

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

14 years agoStore the vtable components in a SmallVector.
Anders Carlsson [Fri, 4 Dec 2009 16:24:46 +0000 (16:24 +0000)]
Store the vtable components in a SmallVector.

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

14 years agoUse a different ConstantArray::get.
Anders Carlsson [Fri, 4 Dec 2009 16:22:27 +0000 (16:22 +0000)]
Use a different ConstantArray::get.

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

14 years agoMove the vtable vector directly into the Vtable builder.
Anders Carlsson [Fri, 4 Dec 2009 16:19:30 +0000 (16:19 +0000)]
Move the vtable vector directly into the Vtable builder.

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

14 years agoChange getIndex to return false if the index wasn't found. Avoids an extra hash lookup.
Anders Carlsson [Fri, 4 Dec 2009 15:49:02 +0000 (15:49 +0000)]
Change getIndex to return false if the index wasn't found. Avoids an extra hash lookup.

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

14 years agoMinor cleanup; no functionality change.
Eli Friedman [Fri, 4 Dec 2009 08:52:11 +0000 (08:52 +0000)]
Minor cleanup; no functionality change.

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

14 years agoRemove unused argument.
Eli Friedman [Fri, 4 Dec 2009 08:40:51 +0000 (08:40 +0000)]
Remove unused argument.

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

14 years agoEliminate submethods vector.
Eli Friedman [Fri, 4 Dec 2009 08:36:58 +0000 (08:36 +0000)]
Eliminate submethods vector.

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

14 years agoEliminate the inner loop in VtableBuilder::OverrideMethod.
Eli Friedman [Fri, 4 Dec 2009 08:34:14 +0000 (08:34 +0000)]
Eliminate the inner loop in VtableBuilder::OverrideMethod.

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

14 years agoPR5684: Fix refacto, the backend consumer was copying the Diagnostic object,
Daniel Dunbar [Fri, 4 Dec 2009 08:17:40 +0000 (08:17 +0000)]
PR5684: Fix refacto, the backend consumer was copying the Diagnostic object,
which meant that hasErrorOccurred() checks to prevent codegen-on-invalid weren't
working.

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

14 years agoASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit made
Daniel Dunbar [Fri, 4 Dec 2009 08:17:33 +0000 (08:17 +0000)]
ASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit made
from a source file.
 - This allows CIndex to avoid iterating over all the top-level decls when using
   a PCH, which means we deserialize far fewer decls.

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

14 years agoIgnore -fsched-interblock and -freorder-blocks to the ignored -f flags, we have
Daniel Dunbar [Fri, 4 Dec 2009 08:17:18 +0000 (08:17 +0000)]
Ignore -fsched-interblock and -freorder-blocks to the ignored -f flags, we have
no plans to support invasive optimization flags.

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

14 years agoMake sure to call PerformObjectMemberConversion where necessary.
Eli Friedman [Fri, 4 Dec 2009 07:18:51 +0000 (07:18 +0000)]
Make sure to call PerformObjectMemberConversion where necessary.

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

14 years agoUse PresumedLoc when emitting the 'included from' diagnostics. For a malformed
Chris Lattner [Fri, 4 Dec 2009 07:06:35 +0000 (07:06 +0000)]
Use PresumedLoc when emitting the 'included from' diagnostics.  For a malformed
test like this:

#line 4 "foo"

#define XX ?

#if XX
#endif

We now emit:

In file included from t.c:7:
foo:7:5: error: invalid token at start of a preprocessor expression
#if XX
    ^
foo:5:12: note: instantiated from:
#define XX ?
           ^

instead of:

In file included from t.c:7:
foo:7:5: error: invalid token at start of a preprocessor expression
#if XX
    ^
./t.h:6:12: note: instantiated from:
#define XX ?
           ^

(where the note doesn't obey #line or print the include stack when needed).

This fixes PR5617

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

14 years agoRename instance variable to avoid name conflict with parameters, and modify addTransi...
Ted Kremenek [Fri, 4 Dec 2009 06:57:49 +0000 (06:57 +0000)]
Rename instance variable to avoid name conflict with parameters, and modify addTransition() to compare the correct state values.

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

14 years agoRevert r90546.
Ted Kremenek [Fri, 4 Dec 2009 06:47:41 +0000 (06:47 +0000)]
Revert r90546.

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

14 years agoMissed change from last commit.
Eli Friedman [Fri, 4 Dec 2009 06:46:54 +0000 (06:46 +0000)]
Missed change from last commit.

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

14 years agoMake the type of the Decl referred to by a MemberExpr a bit more precise.
Eli Friedman [Fri, 4 Dec 2009 06:40:45 +0000 (06:40 +0000)]
Make the type of the Decl referred to by a MemberExpr a bit more precise.

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

14 years agothe assertion says state is not NULL. When state is not NULL, getState()
Zhongxing Xu [Fri, 4 Dec 2009 06:36:49 +0000 (06:36 +0000)]
the assertion says state is not NULL. When state is not NULL, getState()
returns state. So simplify the predicate.

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

14 years agoCorrectly mangle the 'std' namespace inside extern "C++" blocks.
Anders Carlsson [Fri, 4 Dec 2009 06:23:23 +0000 (06:23 +0000)]
Correctly mangle the 'std' namespace inside extern "C++" blocks.

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

14 years agominor tidy.
Chris Lattner [Fri, 4 Dec 2009 06:14:03 +0000 (06:14 +0000)]
minor tidy.

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

14 years agoMake sure that overridden method decls are always canonical.
Anders Carlsson [Fri, 4 Dec 2009 05:51:56 +0000 (05:51 +0000)]
Make sure that overridden method decls are always canonical.

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

14 years agoTest for non-canonical decl and vtables.
Eli Friedman [Fri, 4 Dec 2009 04:30:55 +0000 (04:30 +0000)]
Test for non-canonical decl and vtables.

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

14 years agoFix regression in vtable improvements.
Eli Friedman [Fri, 4 Dec 2009 04:30:03 +0000 (04:30 +0000)]
Fix regression in vtable improvements.

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