Commit Graph

108250 Commits

Author SHA1 Message Date
Devang Patel a3cbf52a57 Simplify. Consolidate dbg.declare handling in AllocaPromoter.
llvm-svn: 134538
2011-07-06 21:09:55 +00:00
Andrew Trick 9f8c2853ca indvars -disable-iv-rewrite: ExprToMap lives in Pass data, so be more
careful about referencing values.

llvm-svn: 134537
2011-07-06 21:07:10 +00:00
Fariborz Jahanian 134f4587e7 revert patch for // rdar://9227352
llvm-svn: 134536
2011-07-06 21:05:11 +00:00
Greg Clayton 9432989dd3 Bumped Xcode project version for lldb-68.
llvm-svn: 134534
2011-07-06 21:01:19 +00:00
Jim Grosbach 4db363af7c Remove un-used encoding info from Pseudo MLAv5.
Pseudo-instructions don't have encoding information, as they're lowered
to real instructions by the time we're doing binary encoding.

llvm-svn: 134533
2011-07-06 20:57:35 +00:00
Eli Friedman 499647bfc3 Fix missing triple support for RTEMS target.
llvm-svn: 134532
2011-07-06 20:56:26 +00:00
Alexis Hunt dca31a7964 <inttypes.h> does not necessarily include <stdint.h>. Accordingly, do
not test for this.

llvm-svn: 134531
2011-07-06 20:52:28 +00:00
Andrew Trick 3239055dee indvars -disable-iv-rewrite: Added SimplifyCongruentIVs.
llvm-svn: 134530
2011-07-06 20:50:43 +00:00
Fariborz Jahanian c6ba959ab1 Some code cleanup of r134522
llvm-svn: 134529
2011-07-06 20:48:48 +00:00
Eli Friedman 402339b875 Remove some unnecessary includes.
llvm-svn: 134528
2011-07-06 20:48:27 +00:00
Bill Wendling 5ace8edfd6 Constify getCompactUnwindRegNum.
llvm-svn: 134527
2011-07-06 20:33:48 +00:00
Evan Cheng 299b36fa72 createMCInstPrinter doesn't need TargetMachine anymore.
llvm-svn: 134526
2011-07-06 19:45:57 +00:00
Evan Cheng ab37af9af3 createMCInstPrinter doesn't need TargetMachine anymore.
llvm-svn: 134525
2011-07-06 19:45:42 +00:00
Johnny Chen e58f332b8c Add docstrings for the primordial object -- SBDebugger.
The swig "autodoc" feature to remove '*' from 'char *' will be handled by doing
post-processing on the lldb.py module.

llvm-svn: 134524
2011-07-06 19:28:33 +00:00
Enrico Granata a7187d0000 bug fix in summary strings:
- ${*var[].something} was not working as expected
options -p and -r now also work for type format add

llvm-svn: 134523
2011-07-06 19:27:11 +00:00
Fariborz Jahanian 1f626d6fd1 objc-arc: Support objc_arc_weak_unavailable on those
classes which are incompatible with weak references.
// rdar://9693477

llvm-svn: 134522
2011-07-06 19:24:05 +00:00
Tobias Grosser a3928f5084 LICM: Remove trailing white spaces
llvm-svn: 134521
2011-07-06 19:20:02 +00:00
Tobias Grosser 4a5d9a9c20 LICM: Do not loose alignment on promotion
The promotion code lost any alignment information, when hoisting loads and
stores out of the loop. This lead to incorrect aligned memory accesses. We now
use the largest alignment we can prove to be correct.

llvm-svn: 134520
2011-07-06 19:19:55 +00:00
Johnny Chen d4deaf2677 Remove unnecessary 'import' statement.
llvm-svn: 134519
2011-07-06 19:09:25 +00:00
Greg Clayton dd0649bc5f Fixed an issue that was causing us to crash when evaluating expressions for
objective C or C++ methods when "self" or "this" were in scope, but had 
invalid locations in a DWARF location list. The lack of a valid value caused
us to use an invalid type value and then we tried to import that invalid 
value and we would crash.

llvm-svn: 134518
2011-07-06 18:55:08 +00:00
Jakub Staszak dce4dffc84 Add documenation about "branch_weight" metadata and __builtin_expect instruction
llvm-svn: 134517
2011-07-06 18:31:02 +00:00
Jakub Staszak 3f158fdf6e Introduce "expect" intrinsic instructions.
llvm-svn: 134516
2011-07-06 18:22:43 +00:00
Douglas Gregor 750734c677 Don't try to type-check a copy construction of an exception
declaration with dependent type. Fixes PR10232 /
<rdar://problem/9700653>.

llvm-svn: 134515
2011-07-06 18:14:43 +00:00
Jonathan D. Turner 3b1da3604f Update docs to remove reference to OverloadedFunctionDecl and replace it with DeclContext::lookup_result.
llvm-svn: 134514
2011-07-06 18:12:36 +00:00
Tobias Grosser e790a8dac9 ScopLib: Add missing include
llvm-svn: 134513
2011-07-06 18:05:05 +00:00
Tobias Grosser fe37f8d0ac pollycc: Fix error message if PoCC/Pluto are not available
llvm-svn: 134512
2011-07-06 18:04:59 +00:00
Kevin Enderby 6aac575c9f Update MC/ELF/relocation.s with change to X86 PUSH64i8 in r134501.
llvm-svn: 134511
2011-07-06 17:55:20 +00:00
Jim Ingham 89b6109be8 Set the EvaluationPoint's m_thread_id to the RIGHT invalid define...
llvm-svn: 134505
2011-07-06 17:42:14 +00:00
Douglas Gregor 8a60bbe13f Keep track of when "unrecoverable" errors occur, then allow
clang_saveTranslationUnit() to save a PCH file if the only errors it
contains are recoverable errors. Fixes <rdar://problem/9727804>.

llvm-svn: 134503
2011-07-06 17:40:26 +00:00
Kevin Enderby 6ee1d2bd78 Changed the X86 PUSH64i8 record to use the i64i8imm ParserMatchClass so that a
push with a small constant produces a 2-byte push.

llvm-svn: 134501
2011-07-06 17:23:46 +00:00
David Greene afb9ba7dad Allow tagless builds and fix debug build configuration.
llvm-svn: 134498
2011-07-06 16:54:14 +00:00
Greg Clayton 262f80df5e Made the string representation for a SBValue return what "frame variable"
would return instead of a less than helpful "name: '%s'" description.

Make sure that when we ask for the error from a ValueObject object we
first update the value if needed.

Cleaned up some SB functions to use internal functions and not re-call
through the public API when possible.

llvm-svn: 134497
2011-07-06 16:49:27 +00:00
Benjamin Kramer 37d30835f0 SmallVectorize a critical vector.
The small number of elements was determined by taking the median
file length in clang+llvm and /usr/include on OS X with xcode installed.

llvm-svn: 134496
2011-07-06 16:43:46 +00:00
Douglas Gregor 30c80fa3eb libclang: Allow callers of clang_saveTranslationUnit() to distinguish
between different classes of errors. Addresses most of
<rdar://problem/9660328>.

llvm-svn: 134495
2011-07-06 16:43:36 +00:00
Chandler Carruth b4836ea7a8 Build up statistics about the work done for analysis based warnings.
Special detail is added for uninitialized variable analysis as this has
serious performance problems than need to be tracked.

Computing some of this data is expensive, for example walking the CFG to
determine its size. To avoid doing that unless the stats data is going
to be used, we thread a bit into the Sema object to track whether
detailed stats should be collected or not. This bit is used to avoid
computations whereever the computations are likely to be more expensive
than checking the state of the flag. Thus, counters are in some cases
unconditionally updated, but the more expensive (and less frequent)
aggregation steps are skipped.

With this patch, we're able to see that for 'gcc.c':
*** Analysis Based Warnings Stats:
232 functions analyzed (0 w/o CFGs).
  7151 CFG blocks built.
  30 average CFG blocks per function.
  1167 max CFG blocks per function.
163 functions analyzed for uninitialiazed variables
  640 variables analyzed.
  3 average variables per function.
  94 max variables per function.
  96409 block visits.
  591 average block visits per function.
  61546 max block visits per function.

And for the reduced testcase in PR10183:
*** Analysis Based Warnings Stats:
98 functions analyzed (0 w/o CFGs).
  8526 CFG blocks built.
  87 average CFG blocks per function.
  7277 max CFG blocks per function.
68 functions analyzed for uninitialiazed variables
  1359 variables analyzed.
  19 average variables per function.
  1196 max variables per function.
  2540494 block visits.
  37360 average block visits per function.
  2536495 max block visits per function.

That last number is the somewhat scary one that indicates the problem in
PR10183.

llvm-svn: 134494
2011-07-06 16:21:37 +00:00
Douglas Gregor 5c70b06feb Teach the static analyzer's interpretation of Cocoa conventions to
obey the objc_method_family attribute when provided. Fixes
<rdar://problem/9726279>.

llvm-svn: 134493
2011-07-06 16:00:34 +00:00
Enrico Granata e443ba736b Fixed some format names
llvm-svn: 134492
2011-07-06 15:56:06 +00:00
Rafael Espindola ba195cff81 Use attributes from the definition (if available) when
instantiating functions.

Fixes PR10272.

llvm-svn: 134491
2011-07-06 15:46:09 +00:00
Joerg Sonnenberger fbc0b3a826 Fix C&P error
llvm-svn: 134490
2011-07-06 11:00:56 +00:00
John McCall 542e7c6f64 When tree-transforming an expression sequence, always flag expanded
variadic argument pack expansions as having changed, rather than doing
it for each changed expansion, which leaves out zero-argument packs
with catastrophic consequences.

Fixes PR10260.

llvm-svn: 134483
2011-07-06 07:30:07 +00:00
John McCall 21878760a4 Fixed enum types can be complete without actually being valid to use
as scope specifiers;  diagnose the attempt, rather than letting it go
to an assert.  The rest of PR10264.

llvm-svn: 134479
2011-07-06 06:57:57 +00:00
John McCall cb432faf6d Properly protect colons when parsing a nested-name-specifier as part
of an enum specifier in dialects which permit fixed underlying types.
Fixes the rejects-valid part of PR10264.

llvm-svn: 134468
2011-07-06 05:58:41 +00:00
Greg Clayton 34132754bd Fixed some issues with ARM backtraces by not processing any push/pop
instructions if they are conditional. Also fixed issues where the PC wasn't
getting bit zero stripped for ARM targets when a stack frame was thumb. We
now properly call through the GetOpcodeLoadAddress() functions to make sure
the addresses are properly stripped for any targets that may decorate up
their addresses.

We now don't pass the SIGSTOP signals along. We can revisit this soon, but
currently this was interfering with debugging some older ARM targets that
don't have vCont support in the GDB server.

llvm-svn: 134461
2011-07-06 04:07:21 +00:00
Douglas Gregor a98034a25e Improve the Python bindings for libclang in a few ways, from Eli
Bendersky. Specifically: 

* Implemented a new function in libclang: clang_isAttribute

* Fixing TranslationUnit.get_includes to only go through the argument
* buffer when it contains something. This fixed a crash on Windows 

* clang_getFileName returns CXString, not char*. Made appropriate
* fixes in cindex.py - now the relevant tests pass and we can see the
* full locations correctly again (previously there was garbage in
* place of the file name) 
* Exposed clang_getCursorDisplayName to the python bindings

llvm-svn: 134460
2011-07-06 03:00:34 +00:00
John McCall 75bc773be5 Somehow the -fgnu-runtime option itself got lost in all that shuffling.
Restore it.

llvm-svn: 134459
2011-07-06 02:36:30 +00:00
Enrico Granata 9fc1944ece new syntax for summary strings:
- ${*expr} now simply means to dereference expr before actually using it
 - bitfields, array ranges and pointer ranges now work in a (hopefully) more natural and language-compliant way
a new class TypeHierarchyNavigator replicates the behavior of the FormatManager in going through type hierarchies
when one-lining summary strings, children's summaries can be used as well as values

llvm-svn: 134458
2011-07-06 02:13:41 +00:00
Evan Cheng 4d806e2830 Remove the AsmWriterEmitter (unused) feature that rely on TargetSubtargetInfo.
llvm-svn: 134457
2011-07-06 02:02:33 +00:00
John McCall 9de1978f6e Call objc_terminate() instead of abort() when a cleanup throws an
exception in Objective-C;  in Objective-C++ we still use std::terminate().
This is only available in very recent runtimes.

llvm-svn: 134456
2011-07-06 01:22:26 +00:00
John McCall 6dd2417dbe Missing header from last commit; accidental change.
llvm-svn: 134455
2011-07-06 00:38:59 +00:00
Fariborz Jahanian 76b9d4da16 Added a missing case label.
llvm-svn: 134454
2011-07-06 00:29:51 +00:00