Commit Graph

111210 Commits

Author SHA1 Message Date
Devang Patel 0ecbcbd12c Eliminate unnecessary forwarding function.
llvm-svn: 138006
2011-08-18 23:17:55 +00:00
Ivan Krasin 44306e2e5f Add NativeClient operating system support.
This patch adds support of NativeClient (*-*-nacl) OS support to LLVM.
It's already supported in autoconf/config.sub.

The motivation for this change is to start upstreaming PNaCl work. The
whole set of patches include llvm backends (i686, x86_64, ARM),
llvm-gcc (probably, would not be upstreamed because it's deprecated)
and clang (the work has been just started, the amount of changes is
going to be low and the most of the work is expected to be done close
to the mainline).

llvm-svn: 138005
2011-08-18 22:54:21 +00:00
Ted Kremenek 18db5d4e9d Enhance -Wstrl-incorrect-size to not report a FIXIT for destinations that are flexible arrays or have size 1.
llvm-svn: 138004
2011-08-18 22:48:41 +00:00
Owen Anderson 96b7ad2e17 STC2L_POST and STC2L_POST should be handled the same as STCL_POST/LDC_POST for the purposes of decoding all operands except the predicate.
Found by randomized testing.

llvm-svn: 138003
2011-08-18 22:47:44 +00:00
Johnny Chen 293683b6c4 Add an option (-p regexp-pattern) to specify the regular expression symbol pattern we're interested in disassembling.
An example:

utils/test/lldb-disasm.py -C "platform select remote-ios" -o "-b -n" -e '~/CoreFoundation' -n 20 -p '-\[NSArray .+\]'

disassembles the first 20 NSArray instance methods found in the CoreFoundation module.

llvm-svn: 138002
2011-08-18 22:46:50 +00:00
Anna Zaks f4dd4ae7cc Static Analyzer Diagnostics: Move custom diagnostic visitors from BugReporterContext to BugReport.
One API change: I added BugReporter as an additional parameter to the BugReporterVisitor::VisitNode() method to allow visitors register other visitors with the report on the fly (while processing a node). This functionality is used by NilReceiverVisitor, which registers TrackNullOrUndefValue when the receiver is null.

llvm-svn: 138001
2011-08-18 22:37:56 +00:00
Owen Anderson 192a760b54 Fix the decoding of RFE instruction. RFEs have the load bit set, while SRSs have it unset.
llvm-svn: 138000
2011-08-18 22:31:17 +00:00
Ted Kremenek 288d31d62a [libclang] Remove NestedNameSpecifierVisit, as Clang says that this code is dead.
llvm-svn: 137999
2011-08-18 22:25:21 +00:00
Devang Patel a6576a146d Add new DIE into the map asap.
llvm-svn: 137998
2011-08-18 22:21:50 +00:00
Owen Anderson 5d2db89ba6 Remember to fill in some operands so we can print _something_ coherent even when decoding the CPS instruction soft-fails.
llvm-svn: 137997
2011-08-18 22:15:25 +00:00
Owen Anderson 67d6f11974 Improve handling of failure and unpredictable cases for CPS, STR, and SMLA instructions.
Fixes a large class of disassembler crashes found by randomized testing.

llvm-svn: 137995
2011-08-18 22:11:02 +00:00
Ivan Krasin d7cbd4c518 FastISel: avoid function calls between the materialization of the constant and its use.
llvm-svn: 137993
2011-08-18 22:06:10 +00:00
Johnny Chen f6cb9bcf55 Apply some workaround for known crashers.
llvm-svn: 137991
2011-08-18 22:05:58 +00:00
Johnny Chen 901209dcca Add an option '-q' to have quiet disassembly by not printing out the disassembled result.
This could be useful by reducing the strain on standard output.

Example:

utils/test/lldb-disasm.py -C "platform select remote-ios" -o "-b -n" -e '~/CoreFoundation' -n 50 -q

llvm-svn: 137988
2011-08-18 22:04:27 +00:00
Kaelyn Uhrain 40aa7c91b6 Don't accept a typo correction if the corrected identifier is the same as the
uncorrected identifier. Fixes a problem pointed out by Eli.

llvm-svn: 137987
2011-08-18 21:57:36 +00:00
Jim Grosbach 90103ccc05 Thumb assembly parsing and encoding for LDM instruction.
Fix base register type and canonicallize to the "ldm" spelling rather than
"ldmia." Add diagnostics for incorrect writeback token and out-of-range
registers.

llvm-svn: 137986
2011-08-18 21:50:53 +00:00
Dan Gohman c57b58cc40 Make it clear that this code is iterating in reverse order through the array.
llvm-svn: 137985
2011-08-18 21:27:42 +00:00
Ivan Krasin 764b0c1408 Update autoconfig/config.{sub,guess} to the latest version
from the GNU upstream: git://git.savannah.gnu.org/config.git

1. It eliminates a local LLVM patch for auroraux (because, the
mainline config.sub has already got support of auroraux)
2. It adds several new recognized target cpus and operating systems
(in particular, PNaCl)

llvm-svn: 137984
2011-08-18 21:23:18 +00:00
Ted Kremenek 0a57df1981 Remove main() *errors* from warning group.
llvm-svn: 137983
2011-08-18 21:20:46 +00:00
Bill Wendling b15d6eb93b Revert r137871. The loop simplify pass should require all exits from a loop that
aren't from an indirect branch need to be dominated by the loop header.

llvm-svn: 137981
2011-08-18 21:10:01 +00:00
Ted Kremenek 6865f77fdd Reapply r137903, but fix the definition of size_t in the test case to use __SIZE_TYPE__ (and hence be portable).
Also, change the warning to -Wstrl-incorrect-size.

llvm-svn: 137980
2011-08-18 20:55:45 +00:00
Bill Wendling b267e2a7ec Split out the updating of PHI nodes after splitting the BB into a separate
function.

llvm-svn: 137979
2011-08-18 20:51:04 +00:00
Bill Wendling ec3823dcb7 Use this fantzy ArrayRef thing to pass in the list of predecessors.
llvm-svn: 137978
2011-08-18 20:39:32 +00:00
Akira Hatanaka 73d78b7ab1 Make IsShiftedMask a static function rather than defining it in an
anonymous namespace.

llvm-svn: 137975
2011-08-18 20:07:42 +00:00
Owen Anderson 627021d7c0 More Thumb1 decoding tests.
llvm-svn: 137974
2011-08-18 20:05:06 +00:00
Argyrios Kyrtzidis 75f6cd2b79 [libclang] Support code-completion inside macro arguments.
llvm-svn: 137973
2011-08-18 19:41:28 +00:00
Nick Lewycky 74acf9f501 The edge from DISubprogram to DICompileUnit has been removed in recent versions
of debug info.

llvm-svn: 137972
2011-08-18 19:07:42 +00:00
Chad Rosier 222e187e33 Temporarily revert r137925 to appease buildbots. Original commit message:
Teach ModuleManager::addModule() to check whether a particular module
has already been loaded before allocating a new Module structure. If
the module has already been loaded (uniquing based on file name), then
just return the existing module rather than trying to load it again.

This allows us to load a DAG of modules. Introduce a simple test case
that forms a diamond-shaped module graph, and illustrates that a
source file importing the bottom of the diamond can see declarations
in all four of the modules that make up the diamond.

llvm-svn: 137971
2011-08-18 19:06:24 +00:00
Anna Zaks 3c06d7f442 Add a test for checking that custom diagnostic visitors are working.
llvm-svn: 137970
2011-08-18 19:02:46 +00:00
Devang Patel 0071f8a48e Add another test.
llvm-svn: 137969
2011-08-18 18:50:25 +00:00
Devang Patel f907e78b78 Add test to check type uniquing.
llvm-svn: 137968
2011-08-18 18:40:49 +00:00
Kaelyn Uhrain fd81a350e2 Rework DiagnoseInvalidRedeclaration to add the ability to correct typos when
diagnosing invalid function redeclarations.

llvm-svn: 137966
2011-08-18 18:19:12 +00:00
Sean Callanan 6afe390810 Because of disassembler crashes, I rolled back
LLVM to pull in the older ARM disassembler.  I
also modified our build scripts to support
building LLVM from one SVN revision and Clang
from another.

These are temporary measures; as soon as we
get some solid testing in with the new ARM
disassembler, we plan to switch right back.

llvm-svn: 137965
2011-08-18 18:18:33 +00:00
Jim Grosbach 6cb336cb09 Thumb assembly parsing and encoding for EOR.
llvm-svn: 137964
2011-08-18 18:10:38 +00:00
Jim Grosbach 4f240a1fd5 Thumb assembly parsing and encoding for CMP.
llvm-svn: 137963
2011-08-18 18:08:29 +00:00
Argyrios Kyrtzidis 035674d33c [libclang] Annotate correctly macro argument tokens.
llvm-svn: 137961
2011-08-18 18:03:34 +00:00
James Molloy 9f9371ccb3 Test commit; adding test for invalid LDRD which was part of the patch for r137647 but seemingly didn't get svn add'ed.
llvm-svn: 137960
2011-08-18 18:03:02 +00:00
Bill Wendling 6029135af9 Use static instead of anonymous namespace.
llvm-svn: 137959
2011-08-18 17:57:57 +00:00
Chad Rosier 2f8187933f Use StringRef, rather than C string APIs.
llvm-svn: 137958
2011-08-18 17:56:32 +00:00
Jim Grosbach 47bf39d921 Thumb assembly parsing and encoding test for CMN.
llvm-svn: 137957
2011-08-18 17:55:03 +00:00
Jim Grosbach 8a6bed863a Thumb instructions CBZ and CBNZ are Thumb2, not THumb1.
llvm-svn: 137956
2011-08-18 17:51:36 +00:00
Owen Anderson ec3884c50a Port over BL/BLX to disassembly tests.
llvm-svn: 137954
2011-08-18 17:43:52 +00:00
Chris Lattner 3048afb988 Rip out the old StructType APIs as warned about on llvmdev last week.
llvm-svn: 137953
2011-08-18 17:39:28 +00:00
Jim Grosbach 0081879ee7 ARM assembly parsing and encoding test for BX/BLX (register).
llvm-svn: 137949
2011-08-18 17:02:28 +00:00
Jim Grosbach 8b7158e557 ARM assembly parsing and encoding test for BL/BLX (immediate).
llvm-svn: 137948
2011-08-18 17:00:09 +00:00
Jim Grosbach f00b9ccd22 ARM Thumb blx instruction fixup has same data range as bl.
These fixups are handled poorly in general, and should have a single
contiguous range of bits per fixup type, but that's not how they're
currently organized, so for now in complex ones like for blx, we just tell the
emitter it's OK for the fixup to munge any bit it wants.

llvm-svn: 137947
2011-08-18 16:57:50 +00:00
Jim Grosbach 8fa3f6a2b4 80 columns.
llvm-svn: 137946
2011-08-18 16:50:45 +00:00
Manuel Klimek d9d2138561 Fixes traversal of class template nodes on template instantiations.
Also fixes a spelling error.

llvm-svn: 137945
2011-08-18 16:50:43 +00:00
Enrico Granata 85933ed40c Second round of code cleanups:
- reorganizing classes layout to have public part first
   Typedefs that we want to keep private, but must be defined for some public code to work correctly are an exception
 - avoiding methods in the form T foo() { code; } all on one-line
 - moving method implementations from .h to .cpp whenever feasible
   Templatized code is an exception and so are very small methods
 - generally, adhering to coding conventions followed project-wide
Functional changes:
 - fixed an issue where using ${var} in a summary for an aggregate, and then displaying a pointer-to-aggregate would lead to no summary being displayed
   The issue was not a major one because all ${var} was meant to do in that context was display an error for invalid use of pointer
   Accordingly fixed test cases and added a new test case

llvm-svn: 137944
2011-08-18 16:38:26 +00:00
Bruno Cardoso Lopes 2b8078a2cd Clenup and fix encoding for Mips ins and ext instruction
llvm-svn: 137943
2011-08-18 16:30:49 +00:00