Commit Graph

123981 Commits

Author SHA1 Message Date
Craig Topper 41bd30e027 Remove unused functions getArgRegs and getNumArgRegs.
llvm-svn: 152535
2012-03-11 06:46:40 +00:00
Stepan Dyatkovskiy fe3b069a6a llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.

llvm-svn: 152533
2012-03-11 06:09:37 +00:00
Stepan Dyatkovskiy 97b02fc1b3 llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.

llvm-svn: 152532
2012-03-11 06:09:17 +00:00
Douglas Gregor fdd417fcee Document the availability attribute
llvm-svn: 152531
2012-03-11 04:53:21 +00:00
Douglas Gregor 194ea69d62 When template argument deduction is ignoring qualifiers, perform deep
structural comparison of non-dependent types. Otherwise, we end up
rejecting cases where the non-dependent types don't match due to
qualifiers in, e.g., a pointee type. Fixes PR12132.

llvm-svn: 152529
2012-03-11 03:29:50 +00:00
Richard Smith 6d244d754b cxx_status: No compiler changes are required for 'minimal support for garbage
collection'. Keep it in the table to match gcc's table, but mark it N/A.

llvm-svn: 152528
2012-03-11 03:06:00 +00:00
Gregory Szorc 21c9f38977 [llvm.py] Implement disassembler interface
It doesn't currently support the op info and symbol lookup callbacks,
but it is better than nothing.

llvm-svn: 152527
2012-03-11 02:32:56 +00:00
Douglas Gregor f31cee6e1d Add a missing 'template' keyword.
llvm-svn: 152526
2012-03-11 02:23:56 +00:00
Douglas Gregor 39b010f58a Add a few missing 'template' keywords
llvm-svn: 152525
2012-03-11 02:22:41 +00:00
Craig Topper b358499b18 Shrink and reorder some fields in MCOperandInfo to fit it in 8 bytes to reduce size of static tables.
llvm-svn: 152524
2012-03-11 01:57:56 +00:00
Michael J. Spencer 512cab2827 Fix warnings when building with VS11.
llvm-svn: 152523
2012-03-11 01:20:23 +00:00
Michael J. Spencer 914dc77dfc Fix warnings.
llvm-svn: 152522
2012-03-11 00:51:01 +00:00
Jordy Rose f80b2cced7 [analyzer] Replace a static helper with existing logic. No functionality change.
llvm-svn: 152521
2012-03-11 00:08:24 +00:00
Douglas Gregor 50a3cdddda When determining whether an identifier followed by a '<' in a member
access expression is the start of a template-id, ignore function
templates found in the context of the entire postfix-expression. Fixes
PR11856.

llvm-svn: 152520
2012-03-10 23:52:41 +00:00
David Blaikie 631a486e6a Fix crash & accepts-invalid for array of arrays of user defined type.
Test case/other help by Richard Smith.
Code review by John McCall.

llvm-svn: 152519
2012-03-10 23:40:02 +00:00
Aaron Ballman 778cf08746 Fixing a compile warning triggered in MSVC about constant truncation.
llvm-svn: 152518
2012-03-10 23:03:01 +00:00
Michael J. Spencer cfa95f66a1 Make StringRef::getAsInteger work with all integer types. Before this change
it would fail with {,u}int64_t on x86-64 Linux.

This also removes code duplication.

llvm-svn: 152517
2012-03-10 23:02:54 +00:00
Aaron Ballman a97fc66ef3 Updated the test so that it checks for ms-compatibility in addition to ms-extensions.
llvm-svn: 152516
2012-03-10 22:52:10 +00:00
Benjamin Kramer 71ff880ff9 Make helper static, so it can be inlined into its sole caller.
llvm-svn: 152515
2012-03-10 22:41:06 +00:00
Aaron Ballman fa432f30d4 Adding namespace qualifiers to the visualizers and improving their behavior.
Patch thanks to Nikola Smiljanic

llvm-svn: 152514
2012-03-10 22:28:45 +00:00
Gregory Szorc a8b30c5b61 [clang.py] Implement Cursor.objc_type_encoding
llvm-svn: 152513
2012-03-10 22:23:27 +00:00
Aaron Ballman b4489162b6 No longer defining GNUC mode when compiling for Microsoft compatibility. This allows people's cross-platform compiler-specific macros to work properly.
llvm-svn: 152512
2012-03-10 22:21:14 +00:00
Douglas Gregor cffca4a014 Clarify even further that the lambda-to-block-pointer conversion is only available in Objective-C++
llvm-svn: 152511
2012-03-10 22:20:11 +00:00
Gregory Szorc 0e20a09165 [clang.py] Refactor get_tu and get_cursor test helper functions into util.py
llvm-svn: 152510
2012-03-10 22:19:05 +00:00
Richard Smith 5731c75414 PR12225: The requirement that literal operators be namespace-scope functions
does not imply that such functions can't be declared at block scope.

llvm-svn: 152509
2012-03-10 22:18:57 +00:00
Gregory Szorc 11d2e18405 Revert "[llvm.py] Implement interface to enhanced disassembler"
Chris Lattner says the edis interface is going away. It doesn't make
sense to land something that will go away in the near future.

llvm-svn: 152508
2012-03-10 21:44:03 +00:00
Kay Tiong Khoo 57c8e7f364 *fix typo in comment; test of commit access
llvm-svn: 152507
2012-03-10 21:29:49 +00:00
Gregory Szorc 6174a67e04 [llvm.py] Implement interface to enhanced disassembler
This requires a C++ change to EDDisassembler's ctor to function properly
(the llvm::InitializeAll* functions aren't being called currently and
there is no way to call them from Python).

Code is partially tested and works well enough for initial commit. There
are probably many small bugs.

llvm-svn: 152506
2012-03-10 21:05:05 +00:00
Gregory Szorc 053354edce [llvm.py] Make LLVMObject.__del__ work if called during __init__
llvm-svn: 152505
2012-03-10 21:01:14 +00:00
Benjamin Kramer ddefa6d925 Use VersionTuple to manage macosx versions in the driver. No functionality change.
llvm-svn: 152504
2012-03-10 20:55:36 +00:00
Benjamin Kramer 53ba63643c Simplify code. No functionality change.
llvm-svn: 152503
2012-03-10 20:38:56 +00:00
Andrew Trick 61d277f146 Move llc + target triple tests into X86
llvm-svn: 152502
2012-03-10 19:03:51 +00:00
Jeffrey Yasskin 9c95b19f9e Fix moneypunct_byname algorithm to more accurately represent C locales in C++.
llvm-svn: 152501
2012-03-10 18:31:43 +00:00
Fariborz Jahanian fca65102a2 objective-c modern rewriter: add __declspec(dllexport) to forward
declaration of class metadata when they are defined later.

llvm-svn: 152500
2012-03-10 18:25:06 +00:00
Bill Wendling 2bbb7945e7 As Duncan pointed out, pointers tend not to be in floating point format...for now.
llvm-svn: 152499
2012-03-10 18:20:55 +00:00
Benjamin Kramer fee6372daa Don't try to filecheck bitcode.
llvm-svn: 152498
2012-03-10 18:07:46 +00:00
Bill Wendling 0624d2a1ec Make this transformation slightly less agressive and more correct.
The 'CmpInst::isFalseWhenEqual' function returns 'false' for values other than
simply equality. For instance, it returns 'false' for <= or >=. This isn't the
correct behavior for this transformation, which is checking for strict equality
and non-equality. It was causing the gcc.c-torture/execute/frame-address.c test
to fail because it would completely (and incorrectly) optimize a whole function
into a 'ret i32 0'.

llvm-svn: 152497
2012-03-10 17:56:03 +00:00
Fariborz Jahanian b52221e941 objc modern rewriter: Define __OBJC2__ in written file.
// rdar://11024543

llvm-svn: 152496
2012-03-10 17:45:38 +00:00
Benjamin Kramer adfc73d68f C files in llvm still have to be C89 compliant, remove C++-style comments.
llvm-svn: 152495
2012-03-10 15:10:06 +00:00
Benjamin Kramer 616f80225c Replace a map of boolean values with a set.
No functionality change.

llvm-svn: 152494
2012-03-10 15:08:09 +00:00
Rafael Espindola 1f71a23985 The type of a definition should not increase its visibility. Fixes PR12221.
llvm-svn: 152493
2012-03-10 13:01:40 +00:00
Benjamin Kramer 6338e61ae9 Microoptimize getVRegDef. def_begin isn't free, don't compute it twice.
llvm-svn: 152492
2012-03-10 12:50:44 +00:00
John McCall 113bee0536 Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to
track whether the referenced declaration comes from an enclosing
local context.  I'm amenable to suggestions about the exact meaning
of this bit.

llvm-svn: 152491
2012-03-10 09:33:50 +00:00
Chandler Carruth 97f6f03c42 Refactor some methods to look through bitcasts and GEPs on pointers into
a common collection of methods on Value, and share their implementation.
We had two variations in two different places already, and I need the
third variation for inline cost estimation.

Reviewed by Duncan Sands on IRC, but further comments here welcome.

llvm-svn: 152490
2012-03-10 08:39:09 +00:00
Nick Lewycky f604212a44 Slightly tweak this condition. "isTransparentContext()" was checking whether an
enum is scoped or not, which is not relevant here. Instead, phrase the loop in
the same terms that the standard uses, instead of this awkward set of
conditions that is *nearly* equal.

llvm-svn: 152489
2012-03-10 07:47:07 +00:00
Nick Lewycky d9e1e57e2a Could not find this in C99. Perhaps this rule comes from a DR, but in any case
please annotate it with a note explaining why this wrong-seeming behaviour is
correct.

llvm-svn: 152488
2012-03-10 07:45:33 +00:00
Bill Wendling ebb10df441 Fix disasm of iret, sysexit, and sysret when displayed with Intel syntax.
Patch by Kay Tiong Khoo!

llvm-svn: 152487
2012-03-10 07:37:27 +00:00
Bill Wendling 1ab79c6db3 Implement a more intelligent way of spilling uses across an invoke boundary.
The old way of determine when and where to spill a value that was used inside of
a landing pad resulted in spilling that value everywhere and not just at the
invoke edge.

This algorithm determines which values are used within a landing pad. It then
spills those values before the invoke and reloads them before the uses. This
should prevent excessive spilling in many cases, e.g. inside of loops.
<rdar://problem/10609139>

llvm-svn: 152486
2012-03-10 07:11:55 +00:00
Douglas Gregor d2f7007e09 Only make a call to a copy constructor elidable if in fact we are
doing a copy. Fixes PR12139.

llvm-svn: 152485
2012-03-10 06:53:13 +00:00
Gregory Szorc eace54fcb4 [llvm.py] Define enumerations from Core.h; add OpCode class
llvm-svn: 152483
2012-03-10 05:50:56 +00:00