Commit Graph

100127 Commits

Author SHA1 Message Date
Greg Clayton c46f94d490 Cleaned up the EmulateInstructionARM to have the evaluate instruction
callbacks use member functions.

llvm-svn: 124636
2011-02-01 00:49:32 +00:00
Devang Patel 1c0eec5cfb Remove stale test that has never worked, afaik.
llvm-svn: 124635
2011-02-01 00:47:16 +00:00
Rafael Espindola 08bccdad19 Don't tell the linker about available_externally definitions. If we do, it will
complain about duplicated definitions.

llvm-svn: 124634
2011-02-01 00:41:51 +00:00
Rafael Espindola 9fa5a67d3d Set visibility for available_externally globals. This is important for two reasons:
* llvm-link would complains about mismatched visibility
* If we produce a relocation with an available_externally, it is good to know that
it is hidden.

llvm-svn: 124633
2011-02-01 00:37:17 +00:00
John McCall 4fff8f6cff Perform the bad-address-space conversions check as part of
CheckPointerTypesForAssignment.

llvm-svn: 124632
2011-02-01 00:10:29 +00:00
Greg Clayton c1dfd93e1e Made the EmulateInstruction class into a plug-in interface and moved the
source files around into the places they need to go.

llvm-svn: 124631
2011-02-01 00:04:43 +00:00
Argyrios Kyrtzidis b5b5a59f18 Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz!
llvm-svn: 124620
2011-01-31 23:20:03 +00:00
Greg Clayton c30c39982d Added a virtual C++ test case that catches some interesting cases
that you run into with inheritance.

llvm-svn: 124619
2011-01-31 23:14:35 +00:00
John McCall aba9082f0f Make Check*PointerTypesForAssignment private and tell them that they're
working on canonical types already.

llvm-svn: 124618
2011-01-31 23:13:11 +00:00
Johnny Chen 2a183f836c Add emulate_pop (loads multiple registers from the stack) entries to both the
g_arm_opcodes and g_thumb_opcodes tables.

Plus a minor comment fix for EmulateInstruction.h.

llvm-svn: 124617
2011-01-31 23:07:40 +00:00
Douglas Gregor 86af98444f Harden Lexer::GetBeginningOfToken() against bogus source locations and
the disappearance/alteration of files.

llvm-svn: 124616
2011-01-31 22:42:36 +00:00
John McCall e5255935d5 Slightly reorganize CheckAssignmentConstraints and remove some redundant
logic.

llvm-svn: 124615
2011-01-31 22:28:28 +00:00
Douglas Gregor 7a964ad4ce Teach Diagnostic::setClient() to free the existing, owned
client. Fixes a libclang leak.

llvm-svn: 124614
2011-01-31 22:04:05 +00:00
Daniel Dunbar a2867c7741 libclang: Don't allow RemoveFileOnSignal to be called via libclang, badness can
ensue.

llvm-svn: 124613
2011-01-31 22:00:44 +00:00
Daniel Dunbar e326f9bb3e Frontend: Add an explicit RemoveFileOnSignal flag argument, to control the
automatic behavior (which is undesirable in a multithreaded context).

llvm-svn: 124612
2011-01-31 22:00:42 +00:00
Devang Patel 56cc5fdf09 Keep track of incoming argument's location while emitting LiveIns.
llvm-svn: 124611
2011-01-31 21:38:14 +00:00
Devang Patel b07ec831cf While printing "interesting" breakpoint locations for debug info quality test harness, focus only on entry block's terminator for now.
llvm-svn: 124610
2011-01-31 21:36:24 +00:00
Argyrios Kyrtzidis dd88dbf9d2 Add -Wcustom-atomic-properties which warns if an atomic-by-default property has custom getter or setter.
The rationale is that it is highly likely that the user's getter/setter isn't atomically implemented. Off by default.
Addresses rdar://8782645.

-Wcustom-atomic-properties and -Wimplicit-atomic-properties are under the -Watomic-properties group.

llvm-svn: 124609
2011-01-31 21:34:11 +00:00
Roman Divacky 9a58919c8e Enumerate .code16/32/64 instead of checking .code prefix. This
unbreaks some ARM tests.

llvm-svn: 124608
2011-01-31 21:19:43 +00:00
Devang Patel e9f2861551 Tidy up.
llvm-svn: 124605
2011-01-31 21:16:37 +00:00
Devang Patel 5187d8e510 Focus on arguments for now.
llvm-svn: 124604
2011-01-31 21:15:39 +00:00
Roman Divacky bd59dff739 Error on all .code* directives instead of just .code16 as they
all lead to a silent miscompilation of code.

llvm-svn: 124603
2011-01-31 20:56:49 +00:00
Ted Kremenek 47537b617e Document that set-xcode-analyzer should typically be run using sudo.
llvm-svn: 124602
2011-01-31 20:45:38 +00:00
David Greene f3c6873544 Fix vector sign extend to put the source and destination types in the
correct places.

llvm-svn: 124601
2011-01-31 20:39:01 +00:00
Caroline Tice 4dd2a3bb97 Test warning for pending breakpoints.
llvm-svn: 124600
2011-01-31 20:27:28 +00:00
Chris Lattner 865fe3b283 add a note, progress unblocked by PR8575 being fixed.
llvm-svn: 124599
2011-01-31 20:23:28 +00:00
Caroline Tice 1196d48842 Add test for breakpoint id ranges.
llvm-svn: 124598
2011-01-31 20:21:32 +00:00
Johnny Chen 413e6520da Add emulate_add_sp_imm entry to the g_thumb_opcodes table, which represents an operation
to adjust the stack pointer by adding an imm7-scaled value to the SP.

llvm-svn: 124596
2011-01-31 20:09:28 +00:00
Johnny Chen 9eb77456e6 Align comment.
llvm-svn: 124595
2011-01-31 20:01:01 +00:00
Caroline Tice 5126986ffc Add test for help on aliased commands.
llvm-svn: 124594
2011-01-31 19:34:56 +00:00
Douglas Gregor 058d3deab8 Implement reasonable conversion ranking for Objective-C pointer
conversions (<rdar://problem/8592139>) for overload resolution. The
conversion ranking mirrors C++'s conversion ranking fairly closely,
except that we use a same pseudo-subtyping relationship employed by
Objective-C pointer assignment rather than simple checking
derived-to-base conversions. This change covers:

  - Conversions to pointers to a specific object type are better than
  conversions to 'id', 'Class', qualified 'id', or qualified 'Class'
  (note: GCC doesn't perform this ranking, but it matches C++'s rules
  for ranking conversions to void*).
  - Conversions to qualified 'id' or qualified 'Class' are better than
  conversions to 'id' or 'Class', respectively.
  - When two conversion sequences convert to the same type, rank the
  conversions based on the relationship between the types we're
  converting from. 
  - When two conversion sequences convert from the same non-id,
  non-Class type, rank the conversions based on the relationship of
  the types we're converting to. (note: GCC allows this ranking even
  when converting from 'id', which is extremeley dangerous).

llvm-svn: 124591
2011-01-31 18:51:41 +00:00
Oscar Fuentes e866c41f5c Adds some platform checks to cmake/config-ix.cmake and fixes checking
for dlopen/dlerror.

Patch by arrowdodger!

llvm-svn: 124590
2011-01-31 18:25:25 +00:00
Caroline Tice c9c235e796 Add a few more settings tests.
llvm-svn: 124589
2011-01-31 18:18:54 +00:00
Johnny Chen 072c35866a Add some comments to the emulate_* functions.
llvm-svn: 124588
2011-01-31 18:02:28 +00:00
Richard Osborne 272e084bca Fix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.
llvm-svn: 124587
2011-01-31 17:41:44 +00:00
Johnny Chen 1475d4fa36 Minor comment fix.
llvm-svn: 124586
2011-01-31 17:37:39 +00:00
Argyrios Kyrtzidis 33799caf6d Only warn for -Wnon-virtual-dtor for public destructors. Thanks to Benjamin Kramer for the hint!
llvm-svn: 124585
2011-01-31 17:10:25 +00:00
Douglas Gregor 205d5e3a51 Implement the suggested resolution to core issue 547, extended to also
allow ref-qualifiers on function types used as template type
arguments. GNU actually allows cv-qualifiers on function types in many
places where it shouldn't, so we currently categorize this as a GNU
extension.

llvm-svn: 124584
2011-01-31 16:09:46 +00:00
NAKAMURA Takumi 1703f15516 CMake: Fix a few definition to suppress warnings.
llvm-svn: 124583
2011-01-31 09:41:20 +00:00
Argyrios Kyrtzidis 7f3986dc64 Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.
llvm-svn: 124582
2011-01-31 07:05:00 +00:00
Argyrios Kyrtzidis f46cc65f44 Don't warn that variables in C++ static member functions shadow fields. Fixes rdar://8900456.
llvm-svn: 124581
2011-01-31 07:04:54 +00:00
Argyrios Kyrtzidis 857dd06605 Fix the diagnostic when we are shadowing an external variable and there exists a locally scoped extern with the same name.
llvm-svn: 124580
2011-01-31 07:04:50 +00:00
Argyrios Kyrtzidis 819f610942 Diagnose if extern local variable is followed by non-extern and vice-versa.
llvm-svn: 124579
2011-01-31 07:04:46 +00:00
Argyrios Kyrtzidis f41860c882 'extern' variables in functions don't shadow externs in global scope. Fixes rdar://8883302.
llvm-svn: 124578
2011-01-31 07:04:41 +00:00
Argyrios Kyrtzidis 77fd99f8ae If there were errors, disable 'unused' warnings since they will mostly be noise.
Fixes rdar://8736362.

llvm-svn: 124577
2011-01-31 07:04:37 +00:00
Argyrios Kyrtzidis b85cd7c312 Error for use of field from anonymous struct or union should say "invalid use of nonstatic data member"
not "call to non-static member function without an object argument".

llvm-svn: 124576
2011-01-31 07:04:33 +00:00
Argyrios Kyrtzidis 8322b426a5 Amazing that there are still issues with the fields of anonymous struct/unions..
Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236.

llvm-svn: 124575
2011-01-31 07:04:29 +00:00
Argyrios Kyrtzidis 1ce7755c35 Fix test that didn't actually test what it wanted to test.
llvm-svn: 124574
2011-01-31 07:04:24 +00:00
Francois Pichet 79f3a87007 Allow Microsoft attributes in a constructor's parameter list.
This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang.

llvm-svn: 124573
2011-01-31 04:54:32 +00:00
Anton Korobeynikov 221f4faa92 Save a mapping between original and cloned constpool entries.
llvm-svn: 124570
2011-01-30 22:07:39 +00:00