Commit Graph

121576 Commits

Author SHA1 Message Date
Tobias Grosser a0022e911e [clang.py] Implement Cursor.enum_type
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>

llvm-svn: 149830
2012-02-05 11:42:25 +00:00
Tobias Grosser 062d2a3c89 [clang.py] Implement Cursor.underlying_typedef_type
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>

llvm-svn: 149829
2012-02-05 11:42:20 +00:00
Tobias Grosser 13d92a4b8f [clang.py] add TypeKind.VECTOR
Added a missing enumeration.

Contributed by: Gregory Szorc <gregory.szorc@gmail.com>

llvm-svn: 149828
2012-02-05 11:42:14 +00:00
Tobias Grosser 49bd32c1d2 [clang.py] Add CursorKind.{is_translation_unit, is_preprocessing, is_unexposed}
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>

llvm-svn: 149827
2012-02-05 11:42:09 +00:00
Tobias Grosser ebb0ae82a2 [clang.py] Implement Cursor.hash
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>

llvm-svn: 149826
2012-02-05 11:42:03 +00:00
Tobias Grosser 9fc76f2cbf [clang.py] Expose diagnostic category and option info to Python binding
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>

llvm-svn: 149825
2012-02-05 11:41:58 +00:00
Tobias Grosser fb7b4aa45a [clang.py] Implement __eq__ and __ne__ on SourceLocation and SourceRange
There is no type checking in __eq__, so ctypes will throw if the wrong
Python type is passed in to the C function. Personally, I feel garbage
in means garbage out and it isn't worth testing for this explicitly.

Contributed by: Gregory Szorc <gregory.szorc@gmail.com>

llvm-svn: 149824
2012-02-05 11:40:59 +00:00
Nadav Rotem 4f4546b73a Add additional documentation to the extract-and-trunc dagcombine optimization.
llvm-svn: 149823
2012-02-05 11:39:23 +00:00
Benjamin Kramer a20863e67d Fix a typo (builting -> builtin).
Patch by Afriza N. Arief!

llvm-svn: 149822
2012-02-05 11:24:56 +00:00
Benjamin Kramer 93492b8765 Testing vector code without sse doesn't make much sense.
Should bring arm and ppc testers back to life (they default to -mcpu=generic)

llvm-svn: 149821
2012-02-05 11:19:39 +00:00
Eli Bendersky 3ea96a701e Fix typo and broken link
llvm-svn: 149820
2012-02-05 11:17:49 +00:00
Benjamin Kramer 2c0dd81b73 Move operator overload out of line. Calling operator<< on a forward declared type doesn't seem to work on MSVC.
llvm-svn: 149819
2012-02-05 09:46:30 +00:00
Eli Bendersky cf65eff7a5 Add missing paren
llvm-svn: 149817
2012-02-05 09:21:25 +00:00
Craig Topper ee4dab5f1f Convert assert(0) to llvm_unreachable
llvm-svn: 149816
2012-02-05 08:31:47 +00:00
Chandler Carruth ebd90c58e6 Begin fleshing out more convenience predicates in llvm::Triple and
convert at least one client over to use them. Subsequent patches both to
LLVM and Clang will try to convert more people over to a common set of
predicates.

This round of predicates is focused on OS-categorization predicates.

llvm-svn: 149815
2012-02-05 08:26:40 +00:00
Craig Topper c4965bce14 Convert assert(0) to llvm_unreachable
llvm-svn: 149814
2012-02-05 07:21:30 +00:00
David Blaikie f9c1291fde Simplify contains tests using 'count'.
llvm-svn: 149813
2012-02-05 06:35:36 +00:00
Greg Clayton 3b775bff47 Made a fix that would affect anything in the anonymous namespace when looking
for types and comparing decl context matches.

llvm-svn: 149812
2012-02-05 06:14:55 +00:00
Greg Clayton 80c26308cc Added some extra comments for the declaration context comparison function
in the DWARF plug-in.

llvm-svn: 149811
2012-02-05 06:12:47 +00:00
NAKAMURA Takumi 32c48634db BBVectorize.cpp: Get rid of comparision to bool to fix a warning.
llvm-svn: 149810
2012-02-05 05:47:51 +00:00
Craig Topper 4ed7278ff4 Convert assert(0) to llvm_unreachable in X86 Target directory.
llvm-svn: 149809
2012-02-05 05:38:58 +00:00
Craig Topper 83f3bdaa45 Convert some assert(0) in default of switch statements to llvm_unreachable.
llvm-svn: 149808
2012-02-05 03:43:23 +00:00
Craig Topper 1d471e31ba Add target specific node for PMULUDQ. Change patterns to use it and custom lower intrinsics to it. Use it instead of intrinsic to handle 64-bit vector multiplies.
llvm-svn: 149807
2012-02-05 03:14:49 +00:00
Aaron Ballman 0e95d90acc Fixing a warning in MSVC (this is also a test commit)
llvm-svn: 149806
2012-02-05 03:08:16 +00:00
Chris Lattner bb8278a10a Improve the bitcode reader's handling of constant strings to use
ConstantDataArray::getString direction, instead of "boxing" each
byte into a ConstantInt and using ConstantArray::get.

llvm-svn: 149805
2012-02-05 02:41:35 +00:00
Greg Clayton c96605461c <rdar://problem/10560053>
Fixed "target modules list" (aliased to "image list") to output more information
by default. Modified the "target modules list" to have a few new options:

"--header" or "-h" => show the image header address
"--offset" or "-o" => show the image header address offset from the address in the file (the slide applied to the shared library)

Removed the "--symfile-basename" or "-S" option, and repurposed it to 
"--symfile-unique" "-S" which will show the symbol file if it differs from
the executable file.

ObjectFile's can now be loaded from memory for cases where we don't have the
files cached locally in an SDK or net mounted root. ObjectFileMachO can now
read mach files from memory.

Moved the section data reading code into the ObjectFile so that the object
file can get the section data from Process memory if the file is only in
memory.

lldb_private::Module can now load its object file in a target with a rigid 
slide (very common operation for most dynamic linkers) by using:

bool 
Module::SetLoadAddress (Target &target, lldb::addr_t offset, bool &changed)

lldb::SBModule() now has a new constructor in the public interface:

SBModule::SBModule (lldb::SBProcess &process, lldb::addr_t header_addr);

This will find an appropriate ObjectFile plug-in to load an image from memory
where the object file header is at "header_addr".

llvm-svn: 149804
2012-02-05 02:38:54 +00:00
Chris Lattner 6987fdb620 Add a test for the miscompilation my recent ConstantDataArray patches introduced, to make sure
we don't regress on it in the future.

llvm-svn: 149803
2012-02-05 02:37:36 +00:00
Richard Smith 2de5a939e2 constexpr: Implement DR1358: An instantiation of a constexpr function which
can't produce a constant expression is not ill-formed (so long as some
instantiation of that function can produce a constant expression).

llvm-svn: 149802
2012-02-05 02:30:54 +00:00
Chris Lattner 9c81833c8d reapply the patches reverted in r149477, which enable ConstantDataArray.
llvm-svn: 149801
2012-02-05 02:30:40 +00:00
Chris Lattner cf9e8f6968 reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul.  Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.

llvm-svn: 149800
2012-02-05 02:29:43 +00:00
Dylan Noblesmith 2c1dd2716a Basic: import SmallString<> into clang namespace
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

llvm-svn: 149799
2012-02-05 02:13:05 +00:00
Dylan Noblesmith e27789991d Basic: import OwningPtr<> into clang namespace
llvm-svn: 149798
2012-02-05 02:12:40 +00:00
NAKAMURA Takumi 9ef84dde49 Try to fix Benjamin's r149781 on MSVC.
MSVC has complained the definition of "inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, CanQualType T)" in clang/AST/CanonicalType.h.

llvm-svn: 149797
2012-02-05 02:00:07 +00:00
Richard Smith c82fae6070 constexpr: Fix implementation of DR1311: check for volatile qualifiers in
lvalue-to-rvalue conversions on the source type of the conversion, not the
target type (which has them removed for non-class types).

llvm-svn: 149796
2012-02-05 01:23:16 +00:00
Craig Topper 4daa67483d Remove most of the intrinsics for XOP VPCMOV instruction. They all aliased to the same instruction with different types. This would be better accomplished with casts in the not yet created xopintrin.h header file.
llvm-svn: 149795
2012-02-05 00:55:56 +00:00
Bob Wilson 49708d41a6 Preserve alignment for Neon vld1_lane/dup and vst1_lane intrinsics.
We had been generating load/store instructions with the default alignment
for the vector element type, even when the pointer argument had less alignment.
<rdar://problem/10538555>

llvm-svn: 149794
2012-02-04 23:58:08 +00:00
Bob Wilson 6fb01c2c96 Skip freebsd driver test when ppc32/ppc64 targets are not configured.
Otherwise, the clang driver falls back to invoking gcc and the ppc tests
fail.

llvm-svn: 149793
2012-02-04 23:15:59 +00:00
Sebastian Redl 860eb7cf12 A useful approximation of initializer list constructors.
llvm-svn: 149792
2012-02-04 21:27:47 +00:00
Sebastian Redl ab3f7a4e3d Factor out the actual overload resolution from TryConstructorInitialization, since it needs to be used again for list constructor resolution.
llvm-svn: 149791
2012-02-04 21:27:39 +00:00
Sebastian Redl 88e4d4933a Don't unwrap initializer lists before calling TryConstructorInitialization, instead doing a little more work inside. This should make finding initializer list constructors easier, as well as fix one place where the ({}) vs {} issue was probably poorly handled.
llvm-svn: 149790
2012-02-04 21:27:33 +00:00
Sebastian Redl f2089a409e Remove an unused and unimplemented function prototype.
llvm-svn: 149789
2012-02-04 21:27:28 +00:00
Fariborz Jahanian 42d05f2faf Also, these objc++ rewriter tests are meant to run in NeXt's
fragile-abi mode.

llvm-svn: 149788
2012-02-04 19:06:06 +00:00
Fariborz Jahanian 27062dd7d2 These tests are intended to run in NeXt's legacy objective-c abi (fragile-abi).
Make this explicit since default is now nonfragile-abi.

llvm-svn: 149787
2012-02-04 18:56:43 +00:00
Benjamin Kramer 6bc0952b0f Some compilers do require Diagnostic.h to be present here.
llvm-svn: 149785
2012-02-04 14:13:11 +00:00
Benjamin Kramer 1edced6810 Don't include Diagnostics.h twice when it's required zero times.
llvm-svn: 149784
2012-02-04 14:09:30 +00:00
Benjamin Kramer 4903802fbf Move a method from IdentifierTable.h out of line and remove the SmallString include.
Fix all the transitive include users.

llvm-svn: 149783
2012-02-04 13:45:25 +00:00
Benjamin Kramer 02c746de10 Remove Diagnostic.h include from Preprocessor.h.
- Move the offending methods out of line and fix transitive includers.
- This required changing an enum in the PPCallback API into an unsigned.

llvm-svn: 149782
2012-02-04 13:02:15 +00:00
Benjamin Kramer 3307c508c9 Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h.
Fix all the files that depended on transitive includes of Diagnostic.h.
With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.

llvm-svn: 149781
2012-02-04 12:31:12 +00:00
Benjamin Kramer 728ed3f386 Move Storage and StorageAllocator out of the PartialDiagnostic class so we can forward declare them.
Let ASTContext allocate the storage in its BumpPtrAllocator.
This will help us remove ASTContext's depedency on PartialDiagnostic.h soon.

llvm-svn: 149780
2012-02-04 12:30:46 +00:00
Benjamin Kramer 3f85fb2277 StaticAnalyzer: Remove FixIts from PathDiagnosticPieces.
They were unused and pulled in Diagnostic.h for no reason.

llvm-svn: 149779
2012-02-04 12:30:37 +00:00