]> granicus.if.org Git - clang/log
clang
14 years agos/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.
Devang Patel [Thu, 28 Jan 2010 23:15:27 +0000 (23:15 +0000)]
s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.

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

14 years agoFix indentation.
Devang Patel [Thu, 28 Jan 2010 21:54:15 +0000 (21:54 +0000)]
Fix indentation.

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

14 years agoStatic methods do not need "this" pointer argument.
Devang Patel [Thu, 28 Jan 2010 21:43:50 +0000 (21:43 +0000)]
Static methods do not need "this" pointer argument.

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

14 years agoEmit base classes info first, as expected by the debugger.
Devang Patel [Thu, 28 Jan 2010 21:41:35 +0000 (21:41 +0000)]
Emit base classes info first, as expected by the debugger.

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

14 years agoFix an incorrect union layout assert. Fixes PR6164.
Anders Carlsson [Thu, 28 Jan 2010 18:22:03 +0000 (18:22 +0000)]
Fix an incorrect union layout assert. Fixes PR6164.

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

14 years agos/FunctionNames/DebugInfoNames/g
Devang Patel [Thu, 28 Jan 2010 18:21:00 +0000 (18:21 +0000)]
s/FunctionNames/DebugInfoNames/g

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

14 years agoEmit vtable info.
Devang Patel [Thu, 28 Jan 2010 18:11:52 +0000 (18:11 +0000)]
Emit vtable info.

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

14 years agoAccess control for surrogate function calls. Required a moderately gross hack
John McCall [Thu, 28 Jan 2010 07:38:46 +0000 (07:38 +0000)]
Access control for surrogate function calls.  Required a moderately gross hack
to get the access bits set properly in conversion sets.

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

14 years agoIntroduce serialization and deserialization of diagnostic information
Douglas Gregor [Thu, 28 Jan 2010 06:00:51 +0000 (06:00 +0000)]
Introduce serialization and deserialization of diagnostic information
so that CIndex can report diagnostics through the normal mechanisms
even when executing Clang in a separate process. This applies both
when performing code completion and when using ASTs as an intermediary
for clang_createTranslationUnitFromSourceFile().

The serialized format is not perfect at the moment, because it does
not encapsulate macro-instantiation information. Instead, it maps all
source locations back to the instantiation location. However, it does
maintain source-range and fix-it information. To get perfect fidelity
from the serialized format would require serializing a large chunk of
the source manager; at present, it isn't clear if this code will live
long enough for that to matter.

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

14 years agoAdd position of conversion specifier character to 'ConversionSpecifier'.
Ted Kremenek [Thu, 28 Jan 2010 02:46:17 +0000 (02:46 +0000)]
Add position of conversion specifier character to 'ConversionSpecifier'.

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

14 years agoRename namespace clang::printf to clang::analyze_printf to avoid problems where the...
Ted Kremenek [Thu, 28 Jan 2010 02:02:59 +0000 (02:02 +0000)]
Rename namespace clang::printf to clang::analyze_printf to avoid problems where the reference to 'printf' is ambiguous.

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

14 years agoAccess control for overloaded call operators. Not for surrogates yet,
John McCall [Thu, 28 Jan 2010 01:54:34 +0000 (01:54 +0000)]
Access control for overloaded call operators.  Not for surrogates yet,
mostly because we're going to want a better diagnostic for conversions.

Also this API needs to go back to sanity.

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

14 years agoAccess checking for overloaded operators.
John McCall [Thu, 28 Jan 2010 01:42:12 +0000 (01:42 +0000)]
Access checking for overloaded operators.

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

14 years agoFixes a rewrite bug rewriting nested ivars reference.
Fariborz Jahanian [Thu, 28 Jan 2010 01:41:20 +0000 (01:41 +0000)]
Fixes a rewrite bug rewriting nested ivars reference.
(Radar 7583971).

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

14 years agoAdd placeholder function in Sema for new format string checking logic.
Ted Kremenek [Thu, 28 Jan 2010 01:18:22 +0000 (01:18 +0000)]
Add placeholder function in Sema for new format string checking logic.
This function will use the format string parsing logic in libAnalysis,
and once it is shown to be better than the current implementation it
will replace AlternateCheckPrintfString() entirely.

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

14 years agoFix 80 col violation.
Ted Kremenek [Thu, 28 Jan 2010 01:04:48 +0000 (01:04 +0000)]
Fix 80 col violation.

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

14 years agoAllow HandleFormatSpecifier() to indicate that no more processing of the format strin...
Ted Kremenek [Thu, 28 Jan 2010 01:00:59 +0000 (01:00 +0000)]
Allow HandleFormatSpecifier() to indicate that no more processing of the format string is desired.

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

14 years agoSwitch the remaining diagnostic printing in CIndex over to the
Douglas Gregor [Thu, 28 Jan 2010 00:56:43 +0000 (00:56 +0000)]
Switch the remaining diagnostic printing in CIndex over to the
diagnostic callback mechanism, so all diagnostics now go through that
callback. Also, eliminate the displayDiagnostics flag to
clang_createIndex(), since it is no longer necessary: the client
determines whether to display diagnostics or not.

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

14 years agoAdd '@' conversion specifier.
Ted Kremenek [Thu, 28 Jan 2010 00:55:28 +0000 (00:55 +0000)]
Add '@' conversion specifier.

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

14 years agoWhile emitting debugging infor for a C++ class, identify the holder of class's vtable...
Devang Patel [Thu, 28 Jan 2010 00:54:21 +0000 (00:54 +0000)]
While emitting debugging infor for a C++ class, identify the holder of class's vtable, if any.

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

14 years agoInclude "this" pointer argument while emitting debug info for a C++ method.
Devang Patel [Thu, 28 Jan 2010 00:28:01 +0000 (00:28 +0000)]
Include "this" pointer argument while emitting debug info for a C++ method.

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

14 years agoImplement a diagnostics callback for the C interface to Clang, so that
Douglas Gregor [Thu, 28 Jan 2010 00:27:43 +0000 (00:27 +0000)]
Implement a diagnostics callback for the C interface to Clang, so that
clients can format diagnostics as they wish rather than having to
parse standard error. All of the important parts of the front end's
diagnostics are exposed: text, severity, location, source ranges, and
fix-its. The diagnostics callback is now available with
clang_createTranslationUnitFromSource() and
clang_createTranslationUnit().

As part of this change, CXSourceLocation and CXSourceRange got one
pointer larger, since we need to hold on to the SourceManager and
LangOptions structures in the source location. This is the minimum
amount of information needed for the functions that operate on source
locations and ranges (as implemented now). Previously we held on to
the ASTContext, but the diagnostics callback can end up with source
locations when there is no ASTContext (or preprocessor).

Still to do:
  - Code completion needs to support the diagnostics callback, once we
  have the ability to (de-)serialize diagnostics.
  - Eliminate the "displayDiagnostics" argument to createIndex; we'll
  always pass diagnostics to the callback and let it deal with display.

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

14 years agoRemove invalid conversion specifiers from format string checking.
Ted Kremenek [Thu, 28 Jan 2010 00:17:51 +0000 (00:17 +0000)]
Remove invalid conversion specifiers from format string checking.

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

14 years agoAdd a few more conversion specifiers to ParseFormatSpecifier (these appear in SemaChe...
Ted Kremenek [Thu, 28 Jan 2010 00:02:05 +0000 (00:02 +0000)]
Add a few more conversion specifiers to ParseFormatSpecifier (these appear in SemaChecking).

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

14 years agoAdd skeleton for a more structured way to analyzing pring format
Ted Kremenek [Wed, 27 Jan 2010 23:43:25 +0000 (23:43 +0000)]
Add skeleton for a more structured way to analyzing pring format
strings than what we currently have in Sema.  This is both an
experiment and a WIP.

The idea is simple: parse the format string incrementally,
constructing a well-structure representation of each format specifier.
Each format specifier is then handed back one-by-one to a client via a
callback.  Malformed format strings are also handled with callbacks.
The idea is to separate the parsing of the format string from the
emission of diagnostics.  Currently what we have in Sema for handling
format strings is a mongrel of both that is hard to follow and
difficult to modify (I can apply this label since I'm the original
author of that code).

This is in libAnalysis as it is reasonable generic and can potentially
be used both by libSema and libChecker.

Comments welcome.

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

14 years agoRemove ModuleProviders from clang after r94686 removed them from LLVM.
Jeffrey Yasskin [Wed, 27 Jan 2010 21:12:04 +0000 (21:12 +0000)]
Remove ModuleProviders from clang after r94686 removed them from LLVM.

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

14 years agoARM/APCS: Fix alignment of long double.
Daniel Dunbar [Wed, 27 Jan 2010 20:23:08 +0000 (20:23 +0000)]
ARM/APCS: Fix alignment of long double.

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

14 years agoMove more naming conventions logic out of the retain/release checker to CocoaConventi...
Ted Kremenek [Wed, 27 Jan 2010 18:00:17 +0000 (18:00 +0000)]
Move more naming conventions logic out of the retain/release checker to CocoaConventions.h.

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

14 years agoChange the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,
Ken Dyck [Wed, 27 Jan 2010 17:10:57 +0000 (17:10 +0000)]
Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().

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

14 years agoUse raw_ostreams in Preprocessor::ExpandBuiltinMacro. Still not nice but less fragile...
Benjamin Kramer [Wed, 27 Jan 2010 16:38:22 +0000 (16:38 +0000)]
Use raw_ostreams in Preprocessor::ExpandBuiltinMacro. Still not nice but less fragile than the old code.

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

14 years agoAdd missing call to Optional<...>.getValue() that was pointed out by Chandler.
Ted Kremenek [Wed, 27 Jan 2010 16:31:37 +0000 (16:31 +0000)]
Add missing call to Optional<...>.getValue() that was pointed out by Chandler.

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

14 years agoUse getTypeAlignInChars() for alignment in VisitSizeOfAlignOfExpr().
Ken Dyck [Wed, 27 Jan 2010 12:54:25 +0000 (12:54 +0000)]
Use getTypeAlignInChars() for alignment in VisitSizeOfAlignOfExpr().

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

14 years agoUnique ObjC strings (GNU Runtime); fix for PR6142. Note: Doing this in the runtime...
David Chisnall [Wed, 27 Jan 2010 12:49:23 +0000 (12:49 +0000)]
Unique ObjC strings (GNU Runtime); fix for PR6142.  Note: Doing this in the runtime-specific code is a bit ugly.  It would be a good idea to hoist all of the string / protocol uniqueing code up into CGObjCRuntime or CodeGenModule and only handle emitting the original versions in the runtime-specific code.

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

14 years agoSilence a GCC warning about uninitialized variables. The first user of this
Chandler Carruth [Wed, 27 Jan 2010 10:28:04 +0000 (10:28 +0000)]
Silence a GCC warning about uninitialized variables. The first user of this
showed up with a primitive type.

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

14 years agofix a bug in the _MM_TRANSPOSE4_PS definition, patch by Brian Sumner from
Chris Lattner [Wed, 27 Jan 2010 07:54:50 +0000 (07:54 +0000)]
fix a bug in the _MM_TRANSPOSE4_PS definition, patch by Brian Sumner from
PR6138

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

14 years agoFix libCIndex.so's lookup of the clang executable on CMake out-of-tree builds.
Chandler Carruth [Wed, 27 Jan 2010 07:37:16 +0000 (07:37 +0000)]
Fix libCIndex.so's lookup of the clang executable on CMake out-of-tree builds.

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

14 years agoRemove unnecessary ASTContext* argument from isRefType().
Ted Kremenek [Wed, 27 Jan 2010 06:45:10 +0000 (06:45 +0000)]
Remove unnecessary ASTContext* argument from isRefType().

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

14 years agoUpdate CMake build.
Ted Kremenek [Wed, 27 Jan 2010 06:14:12 +0000 (06:14 +0000)]
Update CMake build.

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

14 years agoStart pulling out pieces of the monolithic retain/release checker into
Ted Kremenek [Wed, 27 Jan 2010 06:13:48 +0000 (06:13 +0000)]
Start pulling out pieces of the monolithic retain/release checker into
reusable and modular API pieces.

Start by pulling the logic for deriving the Cocoa naming convention
into a separate API, header, and source file.

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

14 years agoSet -ccc-host-triple in these tests.
Daniel Dunbar [Wed, 27 Jan 2010 04:03:51 +0000 (04:03 +0000)]
Set -ccc-host-triple in these tests.

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

14 years agoFix a major oversight in the comparison of standard conversion
Douglas Gregor [Wed, 27 Jan 2010 03:51:04 +0000 (03:51 +0000)]
Fix a major oversight in the comparison of standard conversion
sequences, where we would occasionally determine (incorrectly) that
one standard conversion sequence was a proper subset of another when,
in fact, they contained completely incomparable conversions.

This change records the types in each step within a standard
conversion sequence, so that we can check the specific comparison
types to determine when one sequence is a proper subset of the
other. Fixes this testcase (thanks, Anders!), which was distilled from
PR6095 (also thanks to Anders).

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

14 years agoImplement access-check delays for out-of-line member definitions
John McCall [Wed, 27 Jan 2010 03:50:35 +0000 (03:50 +0000)]
Implement access-check delays for out-of-line member definitions
using the same framework we use for deprecation warnings.

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

14 years agoAdd support for 3dnow and 3dnowa, and define the target macros accordingly. (This...
Anders Carlsson [Wed, 27 Jan 2010 03:47:49 +0000 (03:47 +0000)]
Add support for 3dnow and 3dnowa, and define the target macros accordingly. (This is needed in order to build Qt).

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

14 years agoIt's not Explicit anymore.
Anders Carlsson [Wed, 27 Jan 2010 03:27:53 +0000 (03:27 +0000)]
It's not Explicit anymore.

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

14 years agoStructs and classes with non-trivial destructors or copy constructors should be passe...
Anders Carlsson [Wed, 27 Jan 2010 03:25:19 +0000 (03:25 +0000)]
Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094.

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

14 years agoUpdate the xcode project for real and don't check in a failing test.
Anders Carlsson [Wed, 27 Jan 2010 03:24:27 +0000 (03:24 +0000)]
Update the xcode project for real and don't check in a failing test.

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

14 years agoUpdate xcode project.
Anders Carlsson [Wed, 27 Jan 2010 03:22:55 +0000 (03:22 +0000)]
Update xcode project.

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

14 years agoXFAIL this for now.
Anders Carlsson [Wed, 27 Jan 2010 03:06:00 +0000 (03:06 +0000)]
XFAIL this for now.

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

14 years agoFix test/CodeGenCXX/default-destructor-synthesis.cpp not to rely on asm output.
Anders Carlsson [Wed, 27 Jan 2010 03:03:08 +0000 (03:03 +0000)]
Fix test/CodeGenCXX/default-destructor-synthesis.cpp not to rely on asm output.

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

14 years agoFix attr.cpp by not checking the generated assembler output.
Anders Carlsson [Wed, 27 Jan 2010 02:49:52 +0000 (02:49 +0000)]
Fix attr.cpp by not checking the generated assembler output.

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

14 years agoImplement access control for overloaded functions. Suppress access control
John McCall [Wed, 27 Jan 2010 01:50:18 +0000 (01:50 +0000)]
Implement access control for overloaded functions.  Suppress access control
diagnostics in "early" lookups, such as during typename checks and when building
unresolved lookup expressions.

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

14 years agoClarify the documentation of ext_vector, and add a small example. Hopefully
Owen Anderson [Wed, 27 Jan 2010 01:22:36 +0000 (01:22 +0000)]
Clarify the documentation of ext_vector, and add a small example.  Hopefully
this will alleviate some confusion about the existence of this feature.

Comments/improvements welcome.

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

14 years agoSupport -marm by treating it as an alias for -mno-thumb.
Daniel Dunbar [Wed, 27 Jan 2010 01:06:14 +0000 (01:06 +0000)]
Support -marm by treating it as an alias for -mno-thumb.

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

14 years agoDriver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number of
Daniel Dunbar [Wed, 27 Jan 2010 00:57:11 +0000 (00:57 +0000)]
Driver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number of
defaults when targetting iPhoneOS (blocks, non-fragile ABI, stack protector).

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

14 years agoDriver/Darwin: Simplify target version checks.
Daniel Dunbar [Wed, 27 Jan 2010 00:57:03 +0000 (00:57 +0000)]
Driver/Darwin: Simplify target version checks.

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

14 years agoDriver/Darwin: Fix a few link arguments when targetting different iPhoneOS
Daniel Dunbar [Wed, 27 Jan 2010 00:56:56 +0000 (00:56 +0000)]
Driver/Darwin: Fix a few link arguments when targetting different iPhoneOS
versions to match gcc (which is matching linker changes).

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

14 years agoDriver/Darwin: Switch clang -triple synthesis to use computed target information.
Daniel Dunbar [Wed, 27 Jan 2010 00:56:49 +0000 (00:56 +0000)]
Driver/Darwin: Switch clang -triple synthesis to use computed target information.

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

14 years agoDriver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actually
Daniel Dunbar [Wed, 27 Jan 2010 00:56:44 +0000 (00:56 +0000)]
Driver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actually
just indicating whether the default target should be iPhoneOS.

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

14 years agoDriver/Darwin: Switch to using isTargetIPhoneOS where appropriate.
Daniel Dunbar [Wed, 27 Jan 2010 00:56:37 +0000 (00:56 +0000)]
Driver/Darwin: Switch to using isTargetIPhoneOS where appropriate.

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

14 years agoDriver/Darwin: Disallow -m{macosx,iphoneos}-version-min as -Xarch arguments.
Daniel Dunbar [Wed, 27 Jan 2010 00:56:31 +0000 (00:56 +0000)]
Driver/Darwin: Disallow -m{macosx,iphoneos}-version-min as -Xarch arguments.

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

14 years agoDriver/Darwin: Track target platform more explicitly in tool chain, eventually
Daniel Dunbar [Wed, 27 Jan 2010 00:56:25 +0000 (00:56 +0000)]
Driver/Darwin: Track target platform more explicitly in tool chain, eventually
this should just be part of the tool chain itself once we have eliminated
argument translation.

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

14 years agoAdd const version of ObjCMethodDecl::getCanonicalDecl().
Ted Kremenek [Wed, 27 Jan 2010 00:37:54 +0000 (00:37 +0000)]
Add const version of ObjCMethodDecl::getCanonicalDecl().

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

14 years agoTeach RegionStore to handle initialization of incomplete arrays in structures using...
Ted Kremenek [Tue, 26 Jan 2010 23:51:00 +0000 (23:51 +0000)]
Teach RegionStore to handle initialization of incomplete arrays in structures using a compound value.  Fixes <rdar://problem/7515938>.

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

14 years agoMove 'LocalCheckers.h' to the 'Checkers' subdirectory.
Ted Kremenek [Tue, 26 Jan 2010 22:59:55 +0000 (22:59 +0000)]
Move 'LocalCheckers.h' to the 'Checkers' subdirectory.

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

14 years agoMove 'include/Checkers/PathSensitive/Checkers' directory to 'include/Checkers'.
Ted Kremenek [Tue, 26 Jan 2010 22:56:15 +0000 (22:56 +0000)]
Move 'include/Checkers/PathSensitive/Checkers' directory to 'include/Checkers'.

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

14 years agoPatch to add 'volatile' to first argument of all
Fariborz Jahanian [Tue, 26 Jan 2010 22:48:42 +0000 (22:48 +0000)]
Patch to add 'volatile' to first argument of all
sync compare_and_swap to match them with gcc.
It also fixes a few incorrect argument defitions.
(fixes radar 7540291).

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

14 years agoRefine the non-virtual this adjustments for thunks by using the offset
Mike Stump [Tue, 26 Jan 2010 22:44:01 +0000 (22:44 +0000)]
Refine the non-virtual this adjustments for thunks by using the offset
to the declaring class from the nearest virtual base class.  WIP.

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

14 years agoBring some semblance of order into Decl.h and Decl.cpp. While at it, fix some typo...
Sebastian Redl [Tue, 26 Jan 2010 22:01:41 +0000 (22:01 +0000)]
Bring some semblance of order into Decl.h and Decl.cpp. While at it, fix some typo comments and remove an unused and unimplemented function prototype. No functionality change.

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

14 years agoRefine the non-virtual this adjustments for thunks by using the offset
Mike Stump [Tue, 26 Jan 2010 21:35:27 +0000 (21:35 +0000)]
Refine the non-virtual this adjustments for thunks by using the offset
to the declaring class from the nearest virtual base class.  WIP.

This fixes 40% of all the problems remaining in one of my testcases.

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

14 years agoAdded assert to the rewrite.
Fariborz Jahanian [Tue, 26 Jan 2010 20:37:44 +0000 (20:37 +0000)]
Added assert to the rewrite.

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

14 years agoConvert one last size variable to CharUnits (follow-on to 94577).
Ken Dyck [Tue, 26 Jan 2010 19:59:28 +0000 (19:59 +0000)]
Convert one last size variable to CharUnits (follow-on to 94577).

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

14 years agoUse CharUnits for sizes, offsets, alignments, and padding amounts for values
Ken Dyck [Tue, 26 Jan 2010 19:44:24 +0000 (19:44 +0000)]
Use CharUnits for sizes, offsets, alignments, and padding amounts for values
that are in character units.

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

14 years agoFix typo in comment
Douglas Gregor [Tue, 26 Jan 2010 19:43:43 +0000 (19:43 +0000)]
Fix typo in comment

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

14 years agoImplement 'clang_getInclusions()' in CIndex. This API allows clients to walk the...
Ted Kremenek [Tue, 26 Jan 2010 19:31:51 +0000 (19:31 +0000)]
Implement 'clang_getInclusions()' in CIndex.  This API allows clients to walk the set of files included in a translation unit via the C API.

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

14 years agoEliminate clang_getInstantiationLocationOffset(), and instead add an
Douglas Gregor [Tue, 26 Jan 2010 19:19:08 +0000 (19:19 +0000)]
Eliminate clang_getInstantiationLocationOffset(), and instead add an
offset parameter to clang_getInstantiationLocation().

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

14 years agoUse CharUnits for alignments in character units.
Ken Dyck [Tue, 26 Jan 2010 19:13:33 +0000 (19:13 +0000)]
Use CharUnits for alignments in character units.

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

14 years agoFix two redefinitions in test cases that weren't diagnosed yet, but will be soon.
Sebastian Redl [Tue, 26 Jan 2010 18:52:33 +0000 (18:52 +0000)]
Fix two redefinitions in test cases that weren't diagnosed yet, but will be soon.

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

14 years agoUse CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().
Ken Dyck [Tue, 26 Jan 2010 18:46:23 +0000 (18:46 +0000)]
Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().

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

14 years agoUse CharUnits for alignment in EmitNullInitializationLValue().
Ken Dyck [Tue, 26 Jan 2010 18:35:11 +0000 (18:35 +0000)]
Use CharUnits for alignment in EmitNullInitializationLValue().

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

14 years agoImplement clang_annotateTokens(), which associates cursors with each
Douglas Gregor [Tue, 26 Jan 2010 18:31:56 +0000 (18:31 +0000)]
Implement clang_annotateTokens(), which associates cursors with each
of the tokens within a raw token stream. This does not even attempt to
handle macros yet.

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

14 years agoRefix rewriting of an ivar access when it is
Fariborz Jahanian [Tue, 26 Jan 2010 18:28:51 +0000 (18:28 +0000)]
Refix rewriting of an ivar access when it is
type-cast to its sub-class (radar 7575882).

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

14 years agoAdd 'PostVisitTU' callback hook to 'perform_test_load()' to allow a special callback...
Ted Kremenek [Tue, 26 Jan 2010 17:59:48 +0000 (17:59 +0000)]
Add 'PostVisitTU' callback hook to 'perform_test_load()' to allow a special callback after the translation unit has been loaded (and streamed).

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

14 years agoAllow the 'visitor' argument to 'perform_test_load()' to be NULL. The
Ted Kremenek [Tue, 26 Jan 2010 17:55:33 +0000 (17:55 +0000)]
Allow the 'visitor' argument to 'perform_test_load()' to be NULL.  The
utility of this change will be made clearer in a subsequent patch when
perform_test_load()' does more than stream the AST.

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

14 years agoUse the right definition when emitting a global variable. Fixes PR5564.
Anders Carlsson [Tue, 26 Jan 2010 17:43:42 +0000 (17:43 +0000)]
Use the right definition when emitting a global variable. Fixes PR5564.

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

14 years agoChange getUnique to return a GlobalDecl. Fixes PR6147.
Anders Carlsson [Tue, 26 Jan 2010 17:36:47 +0000 (17:36 +0000)]
Change getUnique to return a GlobalDecl. Fixes PR6147.

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

14 years agoCorrect cut-and-paste error in doxygen comment for newly introduced
Ken Dyck [Tue, 26 Jan 2010 17:25:18 +0000 (17:25 +0000)]
Correct cut-and-paste error in doxygen comment for newly introduced
getTypeAlignInChars().

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

14 years agoAdd getTypeAlignInChars() for use in code that works in alignments in character
Ken Dyck [Tue, 26 Jan 2010 17:22:55 +0000 (17:22 +0000)]
Add getTypeAlignInChars() for use in code that works in alignments in character
units.

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

14 years agoIntroduce a CIndex API for lexing the raw tokens within a given source
Douglas Gregor [Tue, 26 Jan 2010 17:06:03 +0000 (17:06 +0000)]
Introduce a CIndex API for lexing the raw tokens within a given source
range. The token-annotation function does nothing, yet.

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

14 years agoReplace inheritance of RegionRawOffset from std::pair with two private member
Ken Dyck [Tue, 26 Jan 2010 17:01:47 +0000 (17:01 +0000)]
Replace inheritance of RegionRawOffset from std::pair with two private member
variables to improve readability and encapsulation.

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

14 years agoIntroduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
Ken Dyck [Tue, 26 Jan 2010 13:48:07 +0000 (13:48 +0000)]
Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
of LLVM types in character units.

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

14 years agoAvoid some unnecessary copying of unresolved lookup results.
John McCall [Tue, 26 Jan 2010 07:37:41 +0000 (07:37 +0000)]
Avoid some unnecessary copying of unresolved lookup results.

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

14 years agoHandle redeclarations found by ADL deterministically and reasonably.
John McCall [Tue, 26 Jan 2010 07:16:45 +0000 (07:16 +0000)]
Handle redeclarations found by ADL deterministically and reasonably.

This solution relies on an O(n) scan of redeclarations, which means it might
scale poorly in crazy cases with tons of redeclarations brought in by a ton
of distinct associated namespaces.  I believe that avoiding this
is not worth the common-case cost.

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

14 years agoCorrectly treat 64 bit integers specified via the mode attribute as the 'long'
Chandler Carruth [Tue, 26 Jan 2010 06:39:24 +0000 (06:39 +0000)]
Correctly treat 64 bit integers specified via the mode attribute as the 'long'
type when that type is 64 bits wide, and the 'long long' type when 'long' is
only 32 bits wide. This fixes PR6108.

Also adds a bunch of test cases to ensure proper conversion between equally
sized standard types and mode-specified types on both 32 and 64 bit targets.

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

14 years agoIf a global variable has an initializer with side effects, it can never be deferred...
Anders Carlsson [Tue, 26 Jan 2010 06:15:16 +0000 (06:15 +0000)]
If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).

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

14 years agoAllow ADL to find functions imported by using decls. Leave wordy comment
John McCall [Tue, 26 Jan 2010 06:04:06 +0000 (06:04 +0000)]
Allow ADL to find functions imported by using decls.  Leave wordy comment
about interaction between ADL and default arguments.  Shrug shoulders, commit.

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

14 years agoRemove a few more references to index-test; this was killed in r94210.
Chandler Carruth [Tue, 26 Jan 2010 05:36:44 +0000 (05:36 +0000)]
Remove a few more references to index-test; this was killed in r94210.

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

14 years agoFix another debug info crash with virtual bases.
Anders Carlsson [Tue, 26 Jan 2010 05:26:39 +0000 (05:26 +0000)]
Fix another debug info crash with virtual bases.

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

14 years agoFix the test I broke, and also fix a crash when declaring a virtual destructor. Add...
Anders Carlsson [Tue, 26 Jan 2010 05:19:50 +0000 (05:19 +0000)]
Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.

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

14 years agoFactor creating the DISubprogram for a member function out into a separate function.
Anders Carlsson [Tue, 26 Jan 2010 04:49:33 +0000 (04:49 +0000)]
Factor creating the DISubprogram for a member function out into a separate function.

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

14 years agoSimplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.
Anders Carlsson [Tue, 26 Jan 2010 04:40:11 +0000 (04:40 +0000)]
Simplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.

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