Commit Graph

76320 Commits

Author SHA1 Message Date
Douglas Gregor 5204248f96 When looking up enumerator names for redeclaration, use the
ForRedeclaration flag so that we don't look into base classes. 
Fixes PR6061.

llvm-svn: 93862
2010-01-19 06:06:57 +00:00
Anders Carlsson c68266f324 Update Xcode project.
llvm-svn: 93861
2010-01-19 06:04:24 +00:00
Chris Lattner 95b98959b0 mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.
llvm-svn: 93860
2010-01-19 06:01:04 +00:00
Chris Lattner 282466abf7 factor this code better.
llvm-svn: 93859
2010-01-19 05:51:42 +00:00
Chris Lattner c7a062d187 Now that we have everything nicely factored (e.g. asmprinter is not
doing global variable classification anymore) and hookized, sink almost
all target targets global variable emission code into AsmPrinter and out
of each target.

Some notes:

1. PIC16 does completely custom and crazy stuff, so it is not changed.
2. XCore has some custom handling for extra directives.  I'll look at it next.
3. This switches linux/ppc to use .globl instead of .global.  If .globl is
   actually wrong, let me know and I'll fix it.
4. This makes linux/ppc get a lot of random cases right which were obviously
   wrong before, it is probably now a bit healthier.
5. Blackfin will probably start getting .comm and other things that it didn't
   before.  If this is undesirable, it should explicitly opt out of these
   things by clearing the relevant fields of MCAsmInfo.

This leads to a nice diffstat:
 14 files changed, 127 insertions(+), 830 deletions(-)

llvm-svn: 93858
2010-01-19 05:38:33 +00:00
Chris Lattner f75fe9e34c use %object like other elf targets, gas accepts either.
llvm-svn: 93857
2010-01-19 05:25:38 +00:00
Chris Lattner 9d749a2fc4 simplify the mips target to print .size and .type for c strings
just like all other elf targets.  Bruno, if this isn't right, please
let me know + why :)

llvm-svn: 93856
2010-01-19 05:23:59 +00:00
Chris Lattner b1f2934fc7 hookize the cygwin ".linkonce" directive.
llvm-svn: 93855
2010-01-19 05:08:13 +00:00
Chris Lattner 826d77fb07 more cleanups. Emit the .local directive even on cygwin/mingw.
I'm not sure that this is correct, but it causes no test failures,
and just emitting a .comm without protecting its linkage somehow
is surely not right.

llvm-svn: 93854
2010-01-19 04:59:55 +00:00
Chris Lattner f8a128a1a8 some cleanups
llvm-svn: 93853
2010-01-19 04:53:18 +00:00
Chris Lattner dccbb28bca add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
llvm-svn: 93852
2010-01-19 04:48:20 +00:00
Chris Lattner 6a160517a0 hoist handling of external globals and special globals up to common code.
This makes a similar code dead in all the other targets, I'll clean it up
in a bit.

This also moves handling of lcomm up before acquisition of a section,
since lcomm never needs a section.

llvm-svn: 93851
2010-01-19 04:39:15 +00:00
Chris Lattner e9d28b19cf move production of .reference directives for static ctor/dtor list on
darwin into common code.

llvm-svn: 93849
2010-01-19 04:34:02 +00:00
Bob Wilson 58d59fe394 Fix a crash in scalarrepl for memcpy/memmove where the source and destination
are the same.  I had already fixed a similar problem where the source and
destination were different bitcasts derived from the same alloca, but the
previous fix still did not handle the case where both operands are exactly
the same value.  Radar 7552893.

llvm-svn: 93848
2010-01-19 04:32:48 +00:00
Chris Lattner 35474ca4c4 use BSSLocal classifier to identify 'lcomm' data instead of
duplicating the logic (differently) in lots of different targets.

llvm-svn: 93847
2010-01-19 04:21:20 +00:00
Chris Lattner b253421711 make TLOF subclassify BSS based on linkage type into private, external
and everything else (weak).

llvm-svn: 93846
2010-01-19 04:15:51 +00:00
Chris Lattner 70f0c33ec8 now that elf weak bss symbols are handled correctly, simplify a bunch of code.
llvm-svn: 93845
2010-01-19 03:13:44 +00:00
Chris Lattner a986aa33eb fix a significant difference between llvm and gcc on ELF systems:
GCC would put weak zero initialized mutable data in the .bss section,
we would put it into a crasy '.gnu.linkonce.b.test,"aw",@nobits' 
section.  Fixing this will allow simplifications next up.

llvm-svn: 93844
2010-01-19 03:06:01 +00:00
Chris Lattner 5b585f8b1a introduce a section kind for common linkage. Use this to slightly
simplify and commonize some of the asmprinter logic for globals.

This also avoids printing the MCSection for .zerofill, which broke
the llvm-gcc build.

llvm-svn: 93843
2010-01-19 02:48:26 +00:00
Chris Lattner 024734e0f0 there is no need to emit a .section above .comm on linux.
llvm-svn: 93842
2010-01-19 02:46:56 +00:00
Bill Wendling 220c29465e Even more explanation.
llvm-svn: 93841
2010-01-19 02:44:01 +00:00
Mike Stump bbf5ba66a9 Add try/catch CFG support. Also improve throw CFG support. WIP.
llvm-svn: 93840
2010-01-19 02:20:09 +00:00
Chris Lattner aa1f4fd0ed change an accessor to a predicate.
llvm-svn: 93839
2010-01-19 02:13:06 +00:00
Chris Lattner 1d371882b6 Cleanup handling of .zerofill on darwin:
1. TargetLoweringObjectFileMachO should decide if something
   goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
   the right MCSection, the asmprinters should just emit to the
   right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
   MAI can have a bool "haszerofill" instead of having the textual
   directive to emit.

llvm-svn: 93838
2010-01-19 02:09:44 +00:00
Devang Patel 5e1a83c196 Emit human readable names for operators.
llvm-svn: 93837
2010-01-19 02:02:11 +00:00
Devang Patel 7a12ad0dc1 First cut at emitting debugging information for C++ member functions.
There is lot more work to do in this area.

llvm-svn: 93836
2010-01-19 01:54:44 +00:00
Nate Begeman e945172ba4 Remove this fixme, looking at the linker source, all targets pad to 4 bytes.
llvm-svn: 93835
2010-01-19 01:32:44 +00:00
Ted Kremenek bb1110a7ae Fix possible memory leak by using an OwningPtr.
llvm-svn: 93834
2010-01-19 01:29:05 +00:00
Chris Lattner 17fd6dd7af remove extraneous ;
llvm-svn: 93833
2010-01-19 01:28:09 +00:00
Devang Patel fe189e65d7 Revert accident check-in from r93165.
llvm-svn: 93832
2010-01-19 01:26:02 +00:00
Eric Christopher 84bd316bd6 Fix comment.
llvm-svn: 93831
2010-01-19 01:20:15 +00:00
Douglas Gregor ad27e8b777 Introduce clang_getCursorReferenced, to get a cursor pointing at the
entity that a particular cursor references.

llvm-svn: 93830
2010-01-19 01:20:04 +00:00
Evan Cheng 6c0fb92c03 Fix r93758. Use isel patterns instead of c++ selection code to select rbit and make sure we pick different instructions for ARM vs. Thumb2.
llvm-svn: 93829
2010-01-19 00:44:15 +00:00
Evan Cheng 4668a3b935 Test case for r93758.
llvm-svn: 93824
2010-01-19 00:35:20 +00:00
Douglas Gregor 33c34ac19a Implement clang_getCursorExtent, which provides a source range for the
cursor itself. In particular, for references this returns the source
range of the reference rather than the source range of the thing it
refers to.

Switch c-index-test from clang_getDeclExtent (which will eventually be
deprecated and removed) over to clang_getCursorExtent. The source
ranges we print for references now make sense; fix up the tests
appropriately.

llvm-svn: 93823
2010-01-19 00:34:46 +00:00
Devang Patel 757daca99c Use llvm::Function name as the linkage name, but strip off leading '01' from display name.
llvm-svn: 93822
2010-01-19 00:25:12 +00:00
Dale Johannesen 27d71d2d3a Reverting.
llvm-svn: 93819
2010-01-19 00:12:05 +00:00
Dale Johannesen a3db6ef9a2 Revert 93811 per request.
llvm-svn: 93818
2010-01-19 00:10:52 +00:00
Daniel Dunbar d5f5236468 Add .mk for use by clang/Darwin.
llvm-svn: 93817
2010-01-19 00:01:22 +00:00
Daniel Dunbar bdf248d13a Allow UniversalArchs variable to be overridden on a per-config basis.
llvm-svn: 93816
2010-01-19 00:01:15 +00:00
Daniel Dunbar 4c43c2bc73 Split up switch.S and save_restore_d8_d15.S to follow one function per file convention.
llvm-svn: 93815
2010-01-19 00:01:10 +00:00
Devang Patel 889ce76f41 Refactor.
llvm-svn: 93814
2010-01-19 00:00:59 +00:00
Douglas Gregor 7ecd020cf2 Teach clang_getCursorLocation() to return the locations of references
rather than the locations that refer to.

llvm-svn: 93812
2010-01-18 23:41:10 +00:00
Dale Johannesen 0c90d43b70 Enable code to emit dbg.declare as DEBUG_VALUE
comments (fast isel, X86).  This doesn't seem
to break any functionality, but will introduce
cases where -g affects the generated code.  I'll
be fixing that.

llvm-svn: 93811
2010-01-18 23:34:55 +00:00
Devang Patel ddf6a57f3e llvm::Function name is the linkage name. If it has a '01' as a prefix then probably there is a reason.
llvm-svn: 93808
2010-01-18 23:27:28 +00:00
Ted Kremenek 7161fc1e2f Tweak USR output for ObjC categories.
llvm-svn: 93805
2010-01-18 23:25:32 +00:00
John McCall 62e2066792 Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.

llvm-svn: 93804
2010-01-18 23:21:37 +00:00
Fariborz Jahanian 42ffdb32fb Allow conversion of pointer to an objective-c pointer to
a similar pointer. Fixes radar 7552179.

llvm-svn: 93803
2010-01-18 22:59:22 +00:00
Victor Hernandez 06828f025d Add comment that MDNode::getFunction() is not to be used by performance-critical code (currently only used by AsmWriter)
llvm-svn: 93802
2010-01-18 22:55:08 +00:00
Douglas Gregor 3338c1f5d2 Now that a reasonable deprecation cycle has passed, kill
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile() outright.

llvm-svn: 93801
2010-01-18 22:48:04 +00:00