Commit Graph

124162 Commits

Author SHA1 Message Date
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
Gregory Szorc 385a2532e0 [llvm.py] Implement interface to object files
It is now possible to load object files and scan over sections, symbols,
and relocations! Includes test code with partial coverage.

llvm-svn: 152482
2012-03-10 04:41:24 +00:00
Argyrios Kyrtzidis 224ec821da [Sema] A tag decl that is marked as invalid and is used in a decl-spec,
should not impede creating a proper TypeLoc info for the decl-spec.

This improves our semantic error recovery.

llvm-svn: 152481
2012-03-10 03:20:58 +00:00
Argyrios Kyrtzidis 0900a74ddf Remove the part of test/Sema/pragma-pack-2.c that has irregular "#pragma pack"s.
Before r151307 this part worked without compiler errors but now it only verifies
that our handling of irregular pragmas is broken compared to gcc, it has no
practical usefulness; it creates invalid structs that cannot be used for 'offsetof' testing.

If we later decide to handle irregular pragmas without compiler errors we can
put back this part.

llvm-svn: 152480
2012-03-10 03:20:52 +00:00
John McCall 7133505936 Unify the BlockDeclRefExpr and DeclRefExpr paths so that
we correctly emit loads of BlockDeclRefExprs even when they
don't qualify as ODR-uses.  I think I'm adequately convinced
that BlockDeclRefExpr can die.

llvm-svn: 152479
2012-03-10 03:05:10 +00:00
John McCall b785a6691b Fix the dumping of BlockExprs.
llvm-svn: 152478
2012-03-10 03:04:55 +00:00
Sean Callanan b7de960158 Hardened the process of reading the program counter
on behalf of a DWARF expression.

llvm-svn: 152477
2012-03-10 03:03:46 +00:00
NAKAMURA Takumi 1e5ec2fcb4 test/Rewriter/rewrite-modern-ivars-2.mm: Add "-triple i386-apple-darwin9".
llvm-svn: 152476
2012-03-10 03:02:29 +00:00
Benjamin Kramer 5291e68c0c Fix a use of the C99 PRI format macros not to conflict with C++11 UDLs.
llvm-svn: 152475
2012-03-10 02:06:27 +00:00
Benjamin Kramer 82803112da Fix uses of the C99 PRI format macros not to conflict with C++11 UDLs.
llvm-svn: 152474
2012-03-10 02:04:38 +00:00
Jim Ingham fd9de90123 Meta classes can't have dynamic types...
<rdar://problem/11021925>

llvm-svn: 152473
2012-03-10 02:03:37 +00:00
Sean Callanan 1fc91ad1c5 ...And finished the job.
llvm-svn: 152472
2012-03-10 02:00:32 +00:00
Sean Callanan d7dabe2237 Hardened isObjCObjectPointerType() against NULLs.
llvm-svn: 152471
2012-03-10 01:59:11 +00:00
Eli Friedman 9135902478 Make sure the accessors for overridden methods don't return inherited constructors. Fixes PR12219.
llvm-svn: 152470
2012-03-10 01:39:01 +00:00
Fariborz Jahanian c9295ec7d2 objc modern rewriter: don't export @package ivar symbols.
llvm-svn: 152469
2012-03-10 01:34:42 +00:00
Ted Kremenek 8fdb59f979 [analyzer] fix regression in analyzer of NOT actually aborting on Stmts it doesn't understand. We registered
as aborted, but didn't treat such cases as sinks in the ExplodedGraph.

Along the way, add basic support for CXXCatchStmt, expanding the set of code we actually analyze (hopefully correctly).

Fixes: <rdar://problem/10892489>
llvm-svn: 152468
2012-03-10 01:34:17 +00:00
Kostya Serebryany b0f9354168 [asan] use O(log(N)) algorithm instead of O(N) in __asan_get_ownership
llvm-svn: 152467
2012-03-10 01:30:01 +00:00
Jason Molenda e23d854c05 Bump lldb version to lldb-127.
llvm-svn: 152465
2012-03-10 01:10:19 +00:00
Jason Molenda 5a37223ece Bump debugserver version to 177.
llvm-svn: 152464
2012-03-10 01:09:40 +00:00
Jason Molenda bdf4161ab7 Re-enable the use of the ARMDisassembler framework when building debugserver for ios.
Greg disabled this back in 2012-01-10 r147886 but we still need to use it.

<rdar://problem/11016745>

llvm-svn: 152463
2012-03-10 01:09:05 +00:00