Ted Kremenek
18e066f6a9
(1) Rename getClangSubversionRevision() to getClangRevision(), and
...
have it return a StringRef instead of an integer (to be more VCS
agnostic).
(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.
(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.
More cleanup to version string generation pending...
llvm-svn: 94231
2010-01-22 22:12:47 +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
Fariborz Jahanian
da8ec2bc9e
Patch to implement rewriting of properties.
...
Fixes radar 7562952.
llvm-svn: 94087
2010-01-21 17:36:00 +00:00
Benjamin Kramer
9c22cc800f
Make some helper functions static.
...
llvm-svn: 94004
2010-01-20 16:21:40 +00:00
Benjamin Kramer
c1a62aa67d
Don't store a Twine temporary, it's unsafe.
...
llvm-svn: 94003
2010-01-20 16:18:11 +00:00
Chandler Carruth
26b29a0892
Move the MacroBuilder utilitiy to its own header. Update references.
...
Comments and/or improvements to the documentation are welcome.
llvm-svn: 93982
2010-01-20 06:13:02 +00:00
Daniel Dunbar
415763612a
Fix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
...
temporaries (this is one reason I'm nervous about propagating their use beyond
particularly performance critical places).
llvm-svn: 93981
2010-01-20 06:09:53 +00:00
Zhongxing Xu
00c6046a81
Add a missing case for DeclContext printer.
...
llvm-svn: 93973
2010-01-20 03:21:28 +00:00
Mike Stump
06c1d87d14
Also handle CXXConstructor, CXXDestructor and CXXConversion in CFG
...
printing.
llvm-svn: 93968
2010-01-20 02:28:05 +00:00
Mike Stump
281d6d7745
Use the llvm coding convention for indentation for switch.
...
llvm-svn: 93966
2010-01-20 02:03:14 +00:00
Chris Lattner
e87668db26
add support for Fedora 10 x86_64, there really should be a better way to handle this.
...
patch by Dmitry
llvm-svn: 93948
2010-01-19 23:30:00 +00:00
John McCall
5d7aa7fa0a
The type of a compound literal expression is not necessarily the same as the
...
type which was syntactically written. Fixes PR 6080.
llvm-svn: 93933
2010-01-19 22:33:45 +00:00
Fariborz Jahanian
f3b9b9583e
Rewriteing of gnu extension __typeof in objective-c rewriter.
...
Fixes radar 6358225.
llvm-svn: 93917
2010-01-19 21:48:35 +00:00
Benjamin Kramer
fb5f40f959
Avoid an instantiation of std::sort.
...
llvm-svn: 93882
2010-01-19 17:42:20 +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
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
Douglas Gregor
8c94086c90
Encoding calling conventions in the type system, from Charles Davis!
...
llvm-svn: 93726
2010-01-18 17:14:39 +00:00
Nuno Lopes
28b40ddbe8
PR6055: fix FreeBSD c++ include path. patch by Roman Divacky
...
llvm-svn: 93668
2010-01-17 00:00:11 +00:00
Sam Weinig
d01101e2d7
Add PCH support for CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, CXXConstCastExpr and CXXFunctionalCastExpr.
...
llvm-svn: 93658
2010-01-16 21:21:01 +00:00
Fariborz Jahanian
faf85c0dbe
Fix a rewriting crash and correct rewriting of __block
...
declaration where its initializer has a type-cast.
llvm-svn: 93650
2010-01-16 19:36:43 +00:00
Douglas Gregor
071676f422
Improve location information for Objective-C category declarations. We
...
previously only had a single location (the @ in @interface); now we
know where the @ is (for the start of the declaration), where the
class name is (that's the normal "location" now for diagnostics), and
where the category name is. Also, eliminated the redundant "end"
location, since ObjCContainerDecl already has better @end information.
The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught
CIndex how to use the new locations.
llvm-svn: 93639
2010-01-16 16:38:58 +00:00
Douglas Gregor
002b671055
Keep track of the source locations for each protocol reference in
...
Objective-C classes, protocol definitions, forward protocol
declarations, and categories. This information isn't actually used
yet; that's coming next.
llvm-svn: 93636
2010-01-16 15:02:53 +00:00
Fariborz Jahanian
f0462ff691
define __weak to null in rewritten source for
...
-fms-extensions as well.
llvm-svn: 93569
2010-01-15 22:29:39 +00:00
John McCall
9751396d70
Preserve type source information in explicit cast expressions.
...
Patch by Enea Zaffanella.
llvm-svn: 93522
2010-01-15 18:39:57 +00:00
Fariborz Jahanian
5c26eeefdd
Do not do the block-specific rewrite when there is no block literals.
...
Fixes radar 7546096.
llvm-svn: 93519
2010-01-15 18:14:52 +00:00
Fariborz Jahanian
195ac2dfab
Patch to avoid duplicate declaration of byref structs
...
for __block variables of same name declared in multiple scopes.
Fixes radar 7540194
llvm-svn: 93474
2010-01-14 23:05:52 +00:00
Fariborz Jahanian
e2dd5428e6
Fix a bug in rewrite whereby functions using blocks put extern "C" in wrong place.
...
Fixes radar 7284618.
llvm-svn: 93382
2010-01-14 00:35:56 +00:00
John McCall
e8595036c4
Add type source information for both kinds of typeof types.
...
Patch by Enea Zaffanella.
llvm-svn: 93344
2010-01-13 20:03:27 +00:00
Fariborz Jahanian
3f7b8b274d
Predefine __weak attribute when doing objective-c
...
rewriting for any target. (refixes radar 7530235).
llvm-svn: 93331
2010-01-13 18:51:17 +00:00
Chris Lattner
3d756f1a9e
diagnose invalid values of -ftabstop, patch by Christian Adaker!
...
llvm-svn: 93288
2010-01-13 03:06:50 +00:00
Daniel Dunbar
4f2bc55d4e
cc1: Factor out CompilerInstance::ExecuteAction which has the majority of the
...
clang -cc1 logic for running an action against a set of options.
- This should make it easier to build tools that have a clang -cc1 like
interface, but aren't actually part of clang -cc1.
llvm-svn: 93282
2010-01-13 00:48:06 +00:00
Fariborz Jahanian
12e2e86f0f
Improve on objective-c pointer recognition
...
during rewrite. No functionality chang.
llvm-svn: 93241
2010-01-12 17:31:23 +00:00
Fariborz Jahanian
5951609ac2
Fix rewriting of MacOS sjlj based eh.
...
Fixes radar 7522880.
llvm-svn: 93219
2010-01-12 01:22:23 +00:00
Fariborz Jahanian
1c2cb6df9e
Fix rewriting for forward class declaration.
...
(fixes radar 6969189).
llvm-svn: 93201
2010-01-11 22:48:40 +00:00
Fariborz Jahanian
9146e44124
Fixup rewrite of ivars accessed via an explicit object
...
in a function. Fixes radar 7522803.
llvm-svn: 93159
2010-01-11 17:50:35 +00:00
Benjamin Kramer
e056cea3a6
Silence MSVC warning.
...
RewriteObjC.cpp(4419) : warning C4804: '>' : unsafe use of type 'bool' in operation
llvm-svn: 93124
2010-01-10 19:57:50 +00:00
Anton Korobeynikov
55bcea1e65
Generalize target weirdness handling having proper layering in mind:
...
1. Add helper class for sema checks for target attributes
2. Add helper class for codegen of target attributes
As a proof-of-concept - implement msp430's 'interrupt' attribute.
llvm-svn: 93118
2010-01-10 12:58:08 +00:00
Daniel Dunbar
d281a7146a
Fix PR5982, a refacto in checking for '=' in a -D argument.
...
llvm-svn: 93088
2010-01-10 00:46:21 +00:00
Chris Lattner
e23003d1f1
implement -ftabstop=width, patch by Christian Adåker
...
llvm-svn: 93078
2010-01-09 21:54:33 +00:00
Chris Lattner
b71980f888
revert 91891, a workaround for PR5514.
...
llvm-svn: 93077
2010-01-09 21:45:57 +00:00
Benjamin Kramer
2d6fda3205
Use MacroBuilder for TargetDefines instead of std::vector.
...
llvm-svn: 93058
2010-01-09 17:55:51 +00:00
Benjamin Kramer
3f6323dea5
Move MacroBuilder into Frontend/Utils.h and clean it up a bit.
...
llvm-svn: 93057
2010-01-09 17:43:21 +00:00
Benjamin Kramer
f65e959035
Rework InitPreprocessor to use a MacroBuilder class instead of pushing around
...
std::vectors.
- MacroBuilder wraps a raw_ostream so it can easily write to any buffer
supported by raw_ostream.
- MacroBuilder's method take Twines for easy string concatenation (this was done
with sprintf and temporary buffers before).
- Targets still use std::vector as they don't have access to the builder.
llvm-svn: 93051
2010-01-09 16:17:37 +00:00
Kovarththanan Rajaratnam
e8ed5be89f
Switch UndefineBuiltinMacro() over to using StringRef
...
llvm-svn: 93049
2010-01-09 09:31:32 +00:00
Kovarththanan Rajaratnam
2f14619d89
Switch DefineBuiltinMacro() over to using StringRef
...
llvm-svn: 93048
2010-01-09 09:27:11 +00:00
Chris Lattner
002ba6b4d0
improve support for dragonfly, patch by Sascha Wildner!
...
llvm-svn: 93044
2010-01-09 05:41:14 +00:00
Dan Gohman
d1e76b957b
Use -fno-math-errno by default, and remove the IsMathErrnoDefault
...
targethook, which is no longer being used. This fixes PR5971.
llvm-svn: 92987
2010-01-08 02:20:44 +00:00
Fariborz Jahanian
39d70940e4
clang ObjC rewriter: generated code used in "for (x in y)" loop uses
...
incorrect cast, causing compile error (fixes radar 7342867).
llvm-svn: 92986
2010-01-08 01:29:44 +00:00