Commit Graph

76527 Commits

Author SHA1 Message Date
Douglas Gregor 816fd36316 Yet more CIndex API cleanup:
- Added more routines to manipulate/compare source locations and ranges
  - Switched clang_getCursor() over to take a CXSourceLocation rather
  than file/line/column.

llvm-svn: 94226
2010-01-22 21:44:22 +00:00
Chris Lattner 00562558ab make the loop comment printer print out a much better structured
output.  An example:

        .align  4, 0x90
LBB1_5:                                                     ## %while.cond3
                                                            ##   Parent Loop BB1_1 Depth=1
                                                            ## =>  This Loop Header: Depth=2
                                                            ##       Child Loop BB1_8 Depth 3
                                                            ##       Child Loop BB1_6 Depth 3

llvm-svn: 94225
2010-01-22 21:43:28 +00:00
Fariborz Jahanian 8c6c0b6a1f ui64, etc. are valid VS suffixes.
Fixes radar 7562363.

llvm-svn: 94224
2010-01-22 21:36:53 +00:00
Nick Kledzik 10b2046750 document runtime support functions
llvm-svn: 94223
2010-01-22 21:21:14 +00:00
Chris Lattner 1386a88c95 Changes to fix buffering that I forgot to commit with previous patch.
llvm-svn: 94222
2010-01-22 21:16:10 +00:00
Chris Lattner e567c8e67f For blocks that are not loop headers, just print their loop depth and header BB.
For loop headers, print Inner loop along with the other stuff so it doesn't take
an extra line.  We now get stuff like this:

LBB1_4:                                                     ## %land.end
                                                            ##   in Loop: Header=BB1_1 Depth=1
        notb    %al
        testb   $1, %al
        jne     LBB1_8

and:

LBB1_6:                                                     ## %while.cond7
                                                            ## Inner Loop Header: Depth=3
                                                            ##     Inside Loop BB1_5 Depth 2
                                                            ##   Inside Loop BB1_1 Depth 1

which still isn't great for loop headers, but is much less verbose.

llvm-svn: 94221
2010-01-22 21:11:06 +00:00
Daniel Dunbar f99eaa948d Tweak clang_darwin config to strip off any -arch if the user overrides CC, we do
this during an Apple style build.

llvm-svn: 94216
2010-01-22 21:06:18 +00:00
Chris Lattner 23e43dbba1 reenable the label loop comments and switch them to use the formatted
comment emission stuff.  I'm going to rewrite this though because the
current output doesn't make sense.

llvm-svn: 94215
2010-01-22 21:00:45 +00:00
Ted Kremenek 17437130e9 Rename pch::SVN_BRANCH_REVISION to pch::VERSION_CONTROL_BRANCH_REVISION.
llvm-svn: 94214
2010-01-22 20:59:36 +00:00
Ted Kremenek 2377a0e0ea Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.
llvm-svn: 94213
2010-01-22 20:55:35 +00:00
Douglas Gregor 9ae8d349e6 Eliminate index-test; all of its tested functionality is now in c-index-test.
llvm-svn: 94211
2010-01-22 20:40:20 +00:00
Douglas Gregor 877524918a Eliminate CIndex's dependency on the Clang Index library, since we
weren't actually using any of its facilities.

llvm-svn: 94210
2010-01-22 20:35:53 +00:00
Mike Stump 0a2754ed8a Be sure to select primary bases among the nearly empties in preorder,
not just among the direct bases.  Before we where missing nearly
empties that were bases of virtual base classes.

llvm-svn: 94208
2010-01-22 20:27:17 +00:00
Daniel Dunbar 862023fcb2 Mark EH_RETURN64 as CodeGenOnly.
llvm-svn: 94205
2010-01-22 20:16:37 +00:00
Benjamin Kramer 3838dfbaea Another strncmp -> StringRef.startswith simplification.
llvm-svn: 94203
2010-01-22 20:00:21 +00:00
Chris Lattner a3eee3cb69 Convert some more random-comment-printing stuff to use
AddComment and GetCommentOS.  Add a blank line between globals
(even in non-verbose mode) to make the assembly more readable.

llvm-svn: 94202
2010-01-22 19:52:01 +00:00
Chris Lattner 88b8b1b419 make this less constrained, we want blank lines between globals.
llvm-svn: 94201
2010-01-22 19:51:08 +00:00
Douglas Gregor 562c1f9365 Teach CIndex's cursor visitor to restrict its traversal to a specific
region of interest (if provided). Implement clang_getCursor() in terms
of this traversal rather than using the Index library; the unified
cursor visitor is more complete, and will be The Way Forward.

Minor other tweaks needed to make this work:
  - Extend Preprocessor::getLocForEndOfToken() to accept an offset
  from the end, making it easy to move to the last character in the
  token (rather than just past the end of the token).
  - In Lexer::MeasureTokenLength(), the length of whitespace is zero.

llvm-svn: 94200
2010-01-22 19:49:59 +00:00
Chris Lattner 8fa0e35f97 add a new MCAsmStreamer::GetCommentOS method to simplify stuff
that doesn't want to use twines.

llvm-svn: 94199
2010-01-22 19:17:48 +00:00
Bob Wilson 6c0c8d41b4 Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bison
test on ARM.

llvm-svn: 94198
2010-01-22 19:16:40 +00:00
Chris Lattner efcadd659d add missing break, PR6114, patch by M Wahab.
llvm-svn: 94197
2010-01-22 19:11:53 +00:00
Victor Hernandez 016b286758 Fix/strengthen verification of llvm.dbg.declare
llvm-svn: 94195
2010-01-22 19:06:12 +00:00
Victor Hernandez 5f8c8c034a Keep ignoring pointer-to-pointer bitcasts
llvm-svn: 94194
2010-01-22 19:05:05 +00:00
Mike Stump 1f49d65235 Finish off fixing up debug information.
llvm-svn: 94193
2010-01-22 18:48:47 +00:00
Chris Lattner e5f7214fac use both the Mangler and the CBE's mangler for identifiers,
this should fix a problem duncan saw handling symbols with '.' in them.

llvm-svn: 94192
2010-01-22 18:33:00 +00:00
Fariborz Jahanian 53967e2abd Patch fixes a lookup bug in c++'s anonymous union member
lookup. Fixes radar 7562438.

llvm-svn: 94191
2010-01-22 18:30:17 +00:00
Chris Lattner e1d8a319a1 rename addComment -> AddComment for consistency.
llvm-svn: 94190
2010-01-22 18:21:35 +00:00
Benjamin Kramer 94b993ed8a Simplify some uses of str(n)cmp with StringRef.
llvm-svn: 94189
2010-01-22 18:21:23 +00:00
Daniel Dunbar e0b374b5ef CMake: Don't try to descend into projects/compiler-rt, it doesn't work.
llvm-svn: 94187
2010-01-22 18:14:27 +00:00
Daniel Dunbar b33a43b521 Make GetSourceVersion more portable, thanks Pawel!
llvm-svn: 94186
2010-01-22 18:14:21 +00:00
Daniel Dunbar a7269442d9 Update CMake LibDeps
llvm-svn: 94185
2010-01-22 18:14:14 +00:00
Daniel Dunbar 99ab0e0377 make: Make .o files depend on Makefile, at least for now.
llvm-svn: 94184
2010-01-22 18:10:54 +00:00
Anders Carlsson 7caa4cb87a No need to canonicalize the type and use dyn_cast. Also, correctly diagnose trying to override a function returning an lvalue reference with a function overriding an rvalue reference.
llvm-svn: 94183
2010-01-22 17:37:20 +00:00
Torok Edwin fbcd2c76d5 Fix TimeValue::now() on Unix.
TimeValue()::now().toEpochTime() is supposed to be the same as time(),
but it wasn't, because toEpoch subtracted PosixZeroTime, but now()
didn't add PosixZeroTime!
Add a unittest to check this works.

llvm-svn: 94178
2010-01-22 15:51:31 +00:00
Douglas Gregor 0599df16a6 Eliminate some Clang warnings
llvm-svn: 94177
2010-01-22 15:41:14 +00:00
Benjamin Kramer d6b28fc6ad Simplify code.
llvm-svn: 94175
2010-01-22 13:59:13 +00:00
Chandler Carruth df7fd5f8d5 Fix an obvious goof that caused us to only see the top level of return types
when checking for covariance. Added some fun test cases, fixes PR6110.

This felt obvious enough to just commit. ;] Let me know if anything needs
tweaking.

llvm-svn: 94173
2010-01-22 13:07:41 +00:00
Dan Gohman 6f08fa70c1 Revert r94066, which was the patch which added a Verifier pass after
LoopStrengthReduce, as it's causing too much trouble (even with the
old LoopStrengthReduce code).

llvm-svn: 94172
2010-01-22 10:48:28 +00:00
Chris Lattner cfa5ebc336 add comment support to the rest of the directives.
llvm-svn: 94168
2010-01-22 07:36:39 +00:00
Chris Lattner e649401824 stop using strtoll, it gives windows heartburn.
llvm-svn: 94167
2010-01-22 07:34:12 +00:00
Chris Lattner 38e9219f71 Add the ability for MCStreamer to emit comments on the same line as directives.
Switch over the asm-verbose comment for double values to use it.  We now get:

_x:
	.long	343597384                                   ## double 1.231200e+02
	.long	1079953326

For example, note that the comment is on the same line as the .long.  Woo.

llvm-svn: 94166
2010-01-22 07:29:22 +00:00
Chris Lattner 0522eb2160 pass "-fasm-verbose" into createAsmStreamer.
llvm-svn: 94165
2010-01-22 07:06:15 +00:00
Chris Lattner 7ba0661f27 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Mike Stump 9eb76d47f2 Ensure we output all non-virtual base vtables. Fixes PR5890.
llvm-svn: 94163
2010-01-22 06:45:05 +00:00
Chris Lattner 5264fce147 give PassNameParser a home.
llvm-svn: 94162
2010-01-22 06:29:25 +00:00
Chris Lattner aec33da793 add an out-of-line virtual method to CmpInst to give it a home.
llvm-svn: 94161
2010-01-22 06:25:37 +00:00
Chris Lattner c7a8eaf614 elimiante the dynamic_cast's from opt.
llvm-svn: 94160
2010-01-22 06:03:06 +00:00
Chris Lattner 5517958641 simplify code.
llvm-svn: 94159
2010-01-22 05:54:03 +00:00
Chris Lattner e0701f987f drop the pass name from the output.
llvm-svn: 94158
2010-01-22 05:52:51 +00:00
Chris Lattner 0b1c7235aa eliminate dynamic_cast from this file.
llvm-svn: 94157
2010-01-22 05:46:59 +00:00