Commit Graph

76320 Commits

Author SHA1 Message Date
Douglas Gregor 66a58819d1 Introduce clang_getCursorLocation(), which supercedes
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4
functions as deprecated and stop using them ourselves.

llvm-svn: 93800
2010-01-18 22:46:11 +00:00
Ted Kremenek 80de67b0cf Refactor USR generation for TagDecls into a common method.
llvm-svn: 93799
2010-01-18 22:42:20 +00:00
Eli Friedman eb0c52f194 Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
match.

llvm-svn: 93798
2010-01-18 22:38:31 +00:00
Eli Friedman 9ed49c5c8f Add some potentially interesting transformations to README.
llvm-svn: 93797
2010-01-18 22:36:59 +00:00
Bill Wendling c592725fbb - Add getLSDAEncoding to the PowerPC backend.
- Greatly improve the comments to the getLSDAEncoding method.

llvm-svn: 93796
2010-01-18 22:36:35 +00:00
Chris Lattner 87d0208c41 allow the HandlerComment callback to push tokens into the
preprocessor.  This could be used by an OpenMP implementation
or something.  Patch by Abramo Bagnara!

llvm-svn: 93795
2010-01-18 22:35:47 +00:00
Chris Lattner f406b2402d simplify the code for skipping in a #if 0 block. The CurLexer
pointer is always non-null because the PTH case exits earlier
in the method.

llvm-svn: 93794
2010-01-18 22:33:01 +00:00
Chris Lattner 6b4f73ea94 make llvm-config more portable to windows versions of perl,
patch by Michael Beck!

llvm-svn: 93793
2010-01-18 22:27:43 +00:00
Daniel Dunbar f665b32a70 Add a VISIBILITY_HIDDEN option, which can be used to make all compiler-rt function definitions hidden/private extern.
llvm-svn: 93790
2010-01-18 22:19:34 +00:00
Daniel Dunbar 64a198d060 Unbreak symbol mangling in .s files, at least for Darwin/Linux.
llvm-svn: 93789
2010-01-18 22:19:25 +00:00
Daniel Dunbar ef89858e47 Add DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED for use in .S files -- restFP and saveFP don't get USER_LABEL_PREFIX prepended for some reason.
llvm-svn: 93788
2010-01-18 22:19:20 +00:00
Chris Lattner 43f2fa6201 my instcombine transformations to make extension elimination more
aggressive changed the canonical form from sext(trunc(x)) to ashr(lshr(x)),
make sure to transform a couple more things into that canonical form,
and catch a case where we missed turning zext/shl/ashr into a single sext.

llvm-svn: 93787
2010-01-18 22:19:16 +00:00
Sean Callanan 0b72fd5ccc Added a newline at the end of SMLoc.h
llvm-svn: 93784
2010-01-18 22:16:54 +00:00
Douglas Gregor 49c4baf430 Clean up the CIndex API slightly.
Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to
better match Clang's SourceLocation. Teach clang_getDeclExtent to fill
in the CXFile properly.

Renamed CXSourceExtent to CXSourceRange, to better match Clang's
SourceLocation.

llvm-svn: 93783
2010-01-18 22:13:09 +00:00
Sean Callanan 85b27528fc Changed the comment in the file header for SMLoc
to something more accurate.

llvm-svn: 93782
2010-01-18 22:11:34 +00:00
Eric Christopher 7eb6e0ffd6 Have FastISel handle llvm.trap().
llvm-svn: 93781
2010-01-18 22:11:29 +00:00
Sean Callanan 2802d2017c Split SMLoc out in its own header so that it can
be used independently of SourceMgr.

llvm-svn: 93780
2010-01-18 22:07:51 +00:00
Ted Kremenek 0ea923c550 Explicitly not handle ObjCForwardProtocolDecl in GetCursorKind().
llvm-svn: 93779
2010-01-18 22:07:45 +00:00
Ted Kremenek a6980af2d2 Tweak USR generation to handle anonymous bitfields.
llvm-svn: 93778
2010-01-18 22:02:49 +00:00
Jim Grosbach e7b52f2e87 Minor cleanup for jump table printing. Need a reference, not a pointer, for
printing via <<. Otherwise we just print the pointer value.

llvm-svn: 93777
2010-01-18 22:01:39 +00:00
Chris Lattner 2b03aaafbf filecheckize this.
llvm-svn: 93776
2010-01-18 22:00:46 +00:00
Chris Lattner 51d64e2a10 filecheckize
llvm-svn: 93775
2010-01-18 21:58:32 +00:00
Chris Lattner 48b753ef9f remove a redundant test, filecheckize another.
llvm-svn: 93774
2010-01-18 21:55:43 +00:00
Evan Cheng 88b65bc835 Canonicalize -1 - x to ~x.
Instcombine does this but apparently there are situations where this pattern will escape the optimizer and / or created by isel. Here is a case that's seen in JavaScriptCore:
  %t1 = sub i32 0, %a
  %t2 = add i32 %t1, -1
The dag combiner pattern: ((c1-A)+c2) -> (c1+c2)-A
will fold it to -1 - %a.

llvm-svn: 93773
2010-01-18 21:38:44 +00:00
Chris Lattner 5a52727ad0 update mkpatch, patch by Garrison Venn!
llvm-svn: 93771
2010-01-18 21:09:05 +00:00
Daniel Dunbar c02aaa7812 Add missing newline.
llvm-svn: 93767
2010-01-18 20:55:52 +00:00
Victor Hernandez 870913f707 Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts array
llvm-svn: 93764
2010-01-18 20:42:09 +00:00
Douglas Gregor c35b54396c float, double, and long double do need extra data in the
BuiltinTypeLoc structure. Thanks, Enea!

llvm-svn: 93763
2010-01-18 20:37:56 +00:00
Victor Hernandez fdf27a61ea Simplify MDNode::getFunction() and assertLocalFunction() by avoiding extra Function* variable and smallptrset since function-local metadata cannot be cyclic
llvm-svn: 93762
2010-01-18 20:36:54 +00:00
Ted Kremenek 473c7a72f1 Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle.
llvm-svn: 93760
2010-01-18 20:23:29 +00:00
Johnny Chen 27f000a9af The most significant encoding bit of GPR:$src or GPR:$dst was over-specified in
the various MOV (register) instructions (16-bit Thumb), including tBRIND (the
indirect branch).  Instead of '1', it should be specified as '?', because GPR
only specifies the register class, which includes both hi-and-lo registers.

llvm-svn: 93759
2010-01-18 20:15:56 +00:00
Jim Grosbach 8546ec9c14 Patch by David Conrad:
"On ARMv6T2 this turns cttz into rbit, clz instead of the 4 instruction
 sequence it is now."

llvm-svn: 93758
2010-01-18 19:58:49 +00:00
Devang Patel 696cb8d410 While mapping llvm.dbg.declare intrinsic manually map its operand, if possible,
because it points to an alloca instruction through metadata.

llvm-svn: 93757
2010-01-18 19:52:14 +00:00
Chris Lattner ffcec8f0d8 reject some invalid IR. We already assert and reject this from the
.ll parser, but PR6070 wants it in the verifier too.

llvm-svn: 93756
2010-01-18 19:50:32 +00:00
Bill Wendling 748ceca695 Add FIXME comment.
llvm-svn: 93755
2010-01-18 19:47:53 +00:00
Bill Wendling a73e471c62 - Add a comment to the callback indicating that it's *extremely* not a good
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
  encoded value in the CIE.

llvm-svn: 93753
2010-01-18 19:36:27 +00:00
John McCall e15bbff98d Preserve type source information in compound literal expressions.
Patch by Enea Zaffanella!

llvm-svn: 93752
2010-01-18 19:35:47 +00:00
Douglas Gregor 9a48db1659 Print fix-it hints properly around tabs, from Christian Adåker!
llvm-svn: 93750
2010-01-18 19:28:01 +00:00
Daniel Dunbar 6bc5be24fa Remove ../libexec from clang program search path, clang-cc is dead.
llvm-svn: 93749
2010-01-18 19:16:53 +00:00
Victor Hernandez cf6830d3eb Make printing of metadata more robust when function is not found (which is the normal situation for non function-local metadata)
llvm-svn: 93748
2010-01-18 19:15:57 +00:00
Mike Stump 211ed4826e Silence a control reaches end of function warning. Patch by Enea
Zaffanella.

llvm-svn: 93743
2010-01-18 18:41:43 +00:00
Fariborz Jahanian cdb8575c9b Mostly renaming some methods and updating comments to
reflect what these methods are actually doing. One method
template for future work. No change in functionality.

llvm-svn: 93742
2010-01-18 18:41:16 +00:00
Douglas Gregor fb00d93c98 Make CMake's clang++ installation respect DESTDIR, based on a patch by
Ingmar Vanhassel. Fixes PR6046.

llvm-svn: 93741
2010-01-18 18:27:29 +00:00
Douglas Gregor c9b7a59b30 Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).

llvm-svn: 93733
2010-01-18 18:04:31 +00:00
Daniel Dunbar e2aa06d4ae Don't build/install clang++ in CLANG_IS_PRODUCTION build mode yet.
llvm-svn: 93732
2010-01-18 17:52:48 +00:00
Daniel Dunbar fadf43c2ae Fix -Asserts warning.
llvm-svn: 93731
2010-01-18 17:52:42 +00:00
Daniel Dunbar e3b3d7a5e4 Fix race condition in creating objdir.
llvm-svn: 93730
2010-01-18 17:52:37 +00:00
Daniel Dunbar ff24e1aa4c Don't try to build compiler-rt if it happens to be checked out into projects/
llvm-svn: 93729
2010-01-18 17:52:28 +00:00
Douglas Gregor 8c94086c90 Encoding calling conventions in the type system, from Charles Davis!
llvm-svn: 93726
2010-01-18 17:14:39 +00:00
Anders Carlsson 07894e8a0e More VTT builder fixes. With these fixes we now correctly handle the very complex VTT example from the Itanium ABI spec.
llvm-svn: 93725
2010-01-18 17:13:59 +00:00