Commit Graph

78485 Commits

Author SHA1 Message Date
Douglas Gregor 06dcf0375b Introduce CIndex API functions for displaying a diagnostic, with some
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.

Use this new function to display diagnostics within c-index-test.

llvm-svn: 96603
2010-02-18 19:08:21 +00:00
Ted Kremenek fcb3db7d68 Tidy up order of switch statement. No functionality change.
llvm-svn: 96602
2010-02-18 18:52:18 +00:00
Dale Johannesen 654528e8a7 Generate DBG_VALUE from dbg.value intrinsics. These currently
comes out as comments but will eventually generate DWARF.

llvm-svn: 96601
2010-02-18 18:51:15 +00:00
Ted Kremenek 7dff4163aa Sort visitor methods so we can easily tell what's implemented.
llvm-svn: 96600
2010-02-18 18:47:08 +00:00
Ted Kremenek 0e2930979d Change cursor behavior for attributes to have them visited as part of recursing
to the children of a Decl.

llvm-svn: 96599
2010-02-18 18:47:01 +00:00
Dan Gohman 9a36847b43 Clarify that ptrtoint+inttoptr are an alternative to GEP which are
not restricted by the GEP rules.

llvm-svn: 96598
2010-02-18 18:40:29 +00:00
Dan Gohman bffa44f975 Fix a typo.
llvm-svn: 96597
2010-02-18 18:22:41 +00:00
Dan Gohman 91b1289daa Clarify that the rules about object hopping kick in when a pointer is
deferenced, rather than when the pointer value is computed.

llvm-svn: 96596
2010-02-18 18:22:18 +00:00
Anders Carlsson f8b53536ed Attempt to fix the 32-bit test failures.
llvm-svn: 96595
2010-02-18 18:20:49 +00:00
Dan Gohman d879ce0715 Fix typos Duncan noticed.
llvm-svn: 96594
2010-02-18 18:19:17 +00:00
Daniel Dunbar 1c32596e56 tests: Tweak %clangxx definition to something which should be more portable.
llvm-svn: 96593
2010-02-18 18:10:26 +00:00
Douglas Gregor 33cdd81064 Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.

To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.

I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.

llvm-svn: 96592
2010-02-18 18:08:43 +00:00
Sanjiv Gupta a124a46748 Remap the call sites of a shared function in interrupt line functions.
llvm-svn: 96591
2010-02-18 18:00:35 +00:00
Anders Carlsson e5faca7cda Fix another bug and add another class.
llvm-svn: 96590
2010-02-18 17:32:33 +00:00
Sanjiv Gupta 32db8a17c5 Re-factoring.
llvm-svn: 96589
2010-02-18 17:32:25 +00:00
Anders Carlsson aa7444cd7d Add another class from cxx-vtable-ex.html
llvm-svn: 96588
2010-02-18 17:28:16 +00:00
Anders Carlsson 8847d9e40a More work on vcall offsets.
llvm-svn: 96587
2010-02-18 17:26:40 +00:00
Anders Carlsson 664b7d026e Add tests from the Itanium C++ ABI spec.
llvm-svn: 96586
2010-02-18 17:07:24 +00:00
Anders Carlsson 78277c7705 Start stubbing out vcall offset handling.
llvm-svn: 96585
2010-02-18 17:00:09 +00:00
Anders Carlsson 5a7654a9d8 Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.
llvm-svn: 96582
2010-02-18 16:29:24 +00:00
Anders Carlsson c8316a2e08 Remove some dead code.
llvm-svn: 96581
2010-02-18 16:24:20 +00:00
Duncan Sands 3d928db087 Uniformize the way these options are printed. Requested by
Russell Wallace.

llvm-svn: 96580
2010-02-18 14:37:52 +00:00
Duncan Sands 1804b4f9eb Remove terminating dot in description. Inconsistency pointed
out by Russell Wallace.

llvm-svn: 96579
2010-02-18 14:10:41 +00:00
Duncan Sands 142b9edaf1 Refer to -help instead of --help since this is what tools themselves say.
Also, have tools output -help-hidden rather than refer to --help-hidden,
for consistency, and likewise adjust documentation.  This doesn't change
every mention of --help, only those which seemed clearly safe.

llvm-svn: 96578
2010-02-18 14:08:13 +00:00
Benjamin Kramer 26d19c59f8 Try to fix the auroraux buildbot. I suspect it has a "#define SEC" somewhere.
llvm-svn: 96577
2010-02-18 13:02:13 +00:00
Benjamin Kramer 32c3d30fc9 Avoid a dangling pointer dereference, PassManager::add can delete the Pass.
llvm-svn: 96576
2010-02-18 12:57:05 +00:00
Chris Lattner 7ed81690ab start sketching out the structure of code for result emission generation.
Nothing real here yet.

llvm-svn: 96575
2010-02-18 06:47:49 +00:00
Chris Lattner fd47c79774 add a missing type cast.
llvm-svn: 96574
2010-02-18 06:33:42 +00:00
Chris Lattner 6a9bdade29 remove empty file
llvm-svn: 96573
2010-02-18 06:29:06 +00:00
Bob Wilson c6c13a3515 Use NEON vmin/vmax instructions for floating-point selects.
Radar 7461718.

llvm-svn: 96572
2010-02-18 06:05:53 +00:00
Ted Kremenek 6ab9aa02e3 Add basic cursor traversal for attributes. We currently don't have source
ranges for Attr objects, so lookup by cursor location currently doesn't work.

llvm-svn: 96571
2010-02-18 05:46:33 +00:00
Charles Davis 9fcead75ee Also don't warn about force_align_arg_pointer on function typedefs. (This will
break if you declare an actual function using that typedef. Come to think of it,
maybe I should make this part of the type.)

llvm-svn: 96570
2010-02-18 04:56:59 +00:00
Jeffrey Yasskin c451027db9 Roll back the shared library, r96559. It broke two darwins and arm, mysteriously.
llvm-svn: 96569
2010-02-18 04:43:02 +00:00
Charles Davis cb9572e7b3 Two fixes related to force_align_arg_pointer:
- Also recognize __force_align_arg_pointer__.
- Don't warn if it's used on a function pointer typedef.

llvm-svn: 96568
2010-02-18 04:39:19 +00:00
Douglas Gregor 44272ca356 Add some spacing in the code-completion results for a return statement
llvm-svn: 96567
2010-02-18 04:06:48 +00:00
Douglas Gregor 4db30233a8 Teach CMake to put the CIndex header into the Xcode/MSVC project
llvm-svn: 96566
2010-02-18 04:01:41 +00:00
Johnny Chen 74c904589e Added LDRSBT, LDRHT, LDRSHT for disassembly only. And fixed encoding errors
of AI3ldsbpo, AI3ldhpo, and AI3ldshpo in ARMInstrFormats.td in the process.

llvm-svn: 96565
2010-02-18 03:27:42 +00:00
John McCall 89b12b34f6 Extract out function-body code generation into its own method. No functionality
change.

llvm-svn: 96564
2010-02-18 03:17:58 +00:00
Ted Kremenek bff31437ef Start adding cursor kinds for attributes, with first exposing
IBActionAttr and IBOutletAttr respectively.

llvm-svn: 96563
2010-02-18 03:09:07 +00:00
Ted Kremenek 1f672829fb Change the behavior of ibaction attributes to be attached to methods, not ivars.
llvm-svn: 96562
2010-02-18 03:08:58 +00:00
Chris Lattner 186ad8098e rename the child field to 'next'. This is not a parent/child
relationship, this is a linear list relationship.

llvm-svn: 96561
2010-02-18 02:53:41 +00:00
Chris Lattner d582a367b5 eliminate the MatcherNodeWithChild class, give the 'child'
field to MatcherNode.

llvm-svn: 96560
2010-02-18 02:49:24 +00:00
Jeffrey Yasskin f750fefaf8 Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add an
--enable-shared configure flag to have the tools linked shared. (2.7svn is just
$(LLVMVersion) so it'll change to "2.7" in the release.)  Always link the
example programs shared to test that the shared library keeps working.

On my mac laptop, Debug libLLVM2.7svn.dylib is 39MB, and opt (for example) is
16M static vs 440K shared.

Two things are less than ideal here:
1) The library doesn't include any version information. Since we expect to break
the ABI with every release, this shouldn't be much of a problem. If we do
release a compatible 2.7.1, we may be able to hack its library to work with
binaries compiled against 2.7.0, or we can just ask them to recompile. I'm
hoping to get a real packaging expert to look at this for the 2.8 release.
2) llvm-config doesn't yet have an option to print link options for the shared
library. I'll add this as a subsequent patch.

llvm-svn: 96559
2010-02-18 02:36:02 +00:00
Douglas Gregor 623421d385 AST import for character literals
llvm-svn: 96557
2010-02-18 02:21:22 +00:00
Evan Cheng 0ceb68a552 Some dag combiner goodness:
Transform br (xor (x, y)) -> br (x != y)
Transform br (xor (xor (x,y), 1)) -> br (x == y)
Also normalize (and (X, 1) == / != 1 -> (and (X, 1)) != / == 0 to match to "test on x86" and "tst on arm"

llvm-svn: 96556
2010-02-18 02:13:50 +00:00
Douglas Gregor 8661a72b48 AST import for forward declarations of Objective-C protocols
llvm-svn: 96555
2010-02-18 02:12:22 +00:00
Douglas Gregor 06537af873 Implement import of forward declarations of Objective-C classes
llvm-svn: 96554
2010-02-18 02:04:09 +00:00
Charles Davis fea4845609 Allow redefinitions of extern inline functions in GNU89 mode, just as GCC
does. Fixes PR5253.

llvm-svn: 96553
2010-02-18 02:00:42 +00:00
Douglas Gregor 84c51c3581 AST import of Objective-C categories.
llvm-svn: 96551
2010-02-18 01:47:50 +00:00
Fariborz Jahanian f50679151b __typeof should be able to handle block pointer types when
rewriting. Fixes radar 7659483.

llvm-svn: 96549
2010-02-18 01:20:22 +00:00