summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/rewrite-legacy-objc.m
Commit message (Collapse)AuthorAgeFilesLines
* Add -fgnuc-version= to control __GNUC__ and other GCC macrosReid Kleckner2019-10-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that compiling on Windows with -fno-ms-compatibility had the side effect of defining __GNUC__, along with __GNUG__, __GXX_RTTI__, and a number of other macros for GCC compatibility. This is undesirable and causes Chromium to do things like mix __attribute__ and __declspec, which doesn't work. We should have a positive language option to enable GCC compatibility features so that we can experiment with -fno-ms-compatibility on Windows. This change adds -fgnuc-version= to be that option. My issue aside, users have, for a long time, reported that __GNUC__ doesn't match their expectations in one way or another. We have encouraged users to migrate code away from this macro, but new code continues to be written assuming a GCC-only environment. There's really nothing we can do to stop that. By adding this flag, we can allow them to choose their own adventure with __GNUC__. This overlaps a bit with the "GNUMode" language option from -std=gnu*. The gnu language mode tends to enable non-conforming behaviors that we'd rather not enable by default, but the we want to set things like __GXX_RTTI__ by default, so I've kept these separate. Helps address PR42817 Reviewed By: hans, nickdesaulniers, MaskRay Differential Revision: https://reviews.llvm.org/D68055 llvm-svn: 374449
* [darwin] remove version number check when enabling ↵Alex Lorenz2018-12-061-1/+1
| | | | | | | | | | -fobjc-subscripting-legacy-runtime This subscripting feature actually works on older OS versions anyway. rdar://36287065 llvm-svn: 348448
* Add a command line option 'fregister_global_dtors_with_atexit' toAkira Hatanaka2018-04-171-3/+3
| | | | | | | | | | | | | | | | | | | | | register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit. Register destructor functions annotated with __attribute__((destructor)) calling __cxa_atexit in a synthesized constructor function instead of emitting references to the functions in a special section. The primary reason for adding this option is that we are planning to deprecate the __mod_term_funcs section on Darwin in the future. This feature is enabled by default only on Darwin. Users who do not want this can use command line option 'fno_register_global_dtors_with_atexit' to disable it. rdar://problem/33887655 Differential Revision: https://reviews.llvm.org/D45578 llvm-svn: 330199
* Driver: extract ObjC option rendering (NFC)Saleem Abdulrasool2017-09-011-3/+3
| | | | | | | | | | | | | Extract the ObjC option rendering for the frontend. This localises the option translation. It augments the existing `AddRuntimeObjCOptions` which handles the runtime/ABI versioning flags only. This new function handles the non-runtime selecting flags. This logic was previously inlined into the `ConstructJob` function. Minor change to the flag ordering to group the blocks related flags together. llvm-svn: 312344
* Record function attribute "stackrealign" instead of using backend optionAkira Hatanaka2015-09-111-3/+3
| | | | | | | | | | | | -force-align-stack. Also, make changes to the driver so that -mno-stack-realign is no longer an option exposed to the end-user that disallows stack realignment in the backend. Differential Revision: http://reviews.llvm.org/D11815 llvm-svn: 247451
* Revert "Driver: Objective-C should respect -fno-exceptions"David Majnemer2014-12-091-2/+2
| | | | | | | | This reverts commit r223455. It's been succesfully argued that -fexceptions (at the driver level) is a misnomer and has little to do with -fobjc-exceptions. llvm-svn: 223723
* Driver: Objective-C should respect -fno-exceptionsDavid Majnemer2014-12-051-2/+2
| | | | | | | | | | | | Clang attempted to replicate a GCC bug: -fobjc-exceptions forces -fexceptions to be enabled. However, this has unintended effects and other awkard side effects that Clang doesn't "correctly" ape (e.g. it's impossible to turn off C++ exceptions in ObjC++ mode). Instead, -f[no]objc-exceptions and -f[no]cxx-exceptions now have an identical relationship with -f[no]exceptions. llvm-svn: 223455
* Introduce f[no-]max-unknown-pointer-align=[number] optionFariborz Jahanian2014-08-051-3/+3
| | | | | | | | | to instruct the code generator to not enforce a higher alignment than the given number (of bytes) when accessing memory via an opaque pointer or reference. Patch reviewed by John McCall (with post-commit review pending). rdar://16254558 llvm-svn: 214911
* ObjectiveC. availability of Array/Dictionary subscriptingFariborz Jahanian2013-11-121-1/+4
| | | | | | | is further restricted in legacy runtime to deployment target of 10.7 and later. // rdar://15363492 llvm-svn: 194507
* ObjectiveC driver change. re-apply patch reverted inFariborz Jahanian2013-11-121-1/+4
| | | | | | r194450 with a modified test. // rdar://15363492 llvm-svn: 194489
* This reverts commit r194435 and r194434.Rafael Espindola2013-11-121-4/+1
| | | | | | Trying to get the bots green. llvm-svn: 194450
* ObjectiveC. Try to unbreak buildbot.Fariborz Jahanian2013-11-121-1/+1
| | | | llvm-svn: 194435
* ObjectiveC. By default allow array/dictionary subscripting inFariborz Jahanian2013-11-111-1/+4
| | | | | | ObjectiveC legacy runtime too. // rdar://15363492 llvm-svn: 194434
* Replace -fobjc-default-synthesize-properties with ↵Rafael Espindola2013-09-271-1/+1
| | | | | | | | | disable-objc-default-synthesize-properties. We want the modern behavior most of the time, so inverting the option simplifies the driver and the tests. llvm-svn: 191551
* block extended signatur option. Change previous optionFariborz Jahanian2012-11-151-1/+1
| | | | | | | | to a cc1 -fencode-extended-block-signature and pass it to cc1 and recognize this option to produce extended block type signature. // rdar://12109031 llvm-svn: 168063
* Remove the -ccc-no-clang option.Rafael Espindola2012-10-311-8/+0
| | | | llvm-svn: 167093
* Restructure how the driver communicates information about theJohn McCall2012-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Use -rewrite-legacy-objc as clang argument for translating Fariborz Jahanian2012-04-021-0/+15
objective-c's fragile abi, Use -rewrite-objc for translating objective-c's modern abi. // rdar://11143173 llvm-svn: 153877
OpenPOWER on IntegriCloud