summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/inline.c
Commit message (Collapse)AuthorAgeFilesLines
* Bring r325915 back.Rafael Espindola2018-02-231-6/+6
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325940
* Revert "Start setting dso_local for COFF."Rafael Espindola2018-02-231-6/+6
| | | | | | | | This reverts commit r325915. It will take some time to fix the failures on a windows host. llvm-svn: 325929
* Start setting dso_local for COFF.Rafael Espindola2018-02-231-6/+6
| | | | | | | | | With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325915
* [PM] The new pass manager requires a registered target for these, andChandler Carruth2016-12-271-0/+2
| | | | | | | given that they hard code specific triples that seems reasonable so add the REQUIRES. llvm-svn: 290560
* [PH] Teach the new PM code path to support -disable-llvm-passes.Chandler Carruth2016-12-271-0/+4
| | | | | | | | | | | This is kind of funny because I specifically did work to make this easy and then it didn't actually get implemented. I've also ported a set of tests that rely on this functionality to run with the new PM as well as the old PM so that we don't mess this up in the future. llvm-svn: 290558
* Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'.Chandler Carruth2016-12-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Much to my surprise, '-disable-llvm-optzns' which I thought was the magical flag I wanted to get at the raw LLVM IR coming out of Clang deosn't do that. It still runs some passes over the IR. I don't want that, I really want the *raw* IR coming out of Clang and I strongly suspect everyone else using it is in the same camp. There is actually a flag that does what I want that I didn't know about called '-disable-llvm-passes'. I suspect many others don't know about it either. It both does what I want and is much simpler. This removes the confusing version and makes that spelling of the flag an alias for '-disable-llvm-passes'. I've also moved everything in Clang to use the 'passes' spelling as it seems both more accurate (*all* LLVM passes are disabled, not just optimizations) and much easier to remember and spell correctly. This is part of simplifying how Clang drives LLVM to make it cleaner to wire up to the new pass manager. Differential Revision: https://reviews.llvm.org/D28047 llvm-svn: 290392
* [MSVC Compat] Enable ABI impacting non-conforming behavior independently of ↵David Majnemer2015-10-081-1/+1
| | | | | | | | | | -fms-compatibility No ABI for C++ currently makes it possible to implement the standard 100% perfectly. We wrongly hid some of our compatible behavior behind -fms-compatibility instead of tying it to the compiler ABI. llvm-svn: 249656
* [MS ABI] Don't generates code for unreferenced inline definitions of library ↵David Majnemer2015-07-101-0/+4
| | | | | | | | | | | builtins We should only consider declarations which were written, implicit declarations shouldn't be considered. This fixes PR24084. llvm-svn: 241941
* Make GNUInline consistent with whether we use traditional GNU inline semantics.Peter Collingbourne2015-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were setting LangOptions::GNUInline (which controls whether we use traditional GNU inline semantics) if the language did not have the C99 feature flag set. The trouble with this is that C++ family languages also do not have that flag set, so we ended up setting this flag in C++ modes (and working around it in a few places downstream by also checking CPlusPlus). The fix is to check whether the C89 flag is set for the target language, rather than whether the C99 flag is cleared. This also lets us remove most CPlusPlus checks. We continue to test CPlusPlus when deciding whether to pre-define the __GNUC_GNU_INLINE__ macro for consistency with GCC. There is a change in semantics in two other places where we weren't checking both CPlusPlus and GNUInline (FunctionDecl::doesDeclarationForceExternallyVisibleDefinition and FunctionDecl::isInlineDefinitionExternallyVisible), but this change seems to put us back into line with GCC's semantics (test case: test/CodeGen/inline.c). While at it, forbid -fgnu89-inline in C++ modes, as GCC doesn't support it, it didn't have any effect before, and supporting it just makes things more complicated. Differential Revision: http://reviews.llvm.org/D9333 llvm-svn: 237299
* Emit DeferredDeclsToEmit in a DFS order.Rafael Espindola2015-01-221-3/+3
| | | | | | | | | | | | | | Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. llvm-svn: 226751
* CodeGen: Emit some functions as weak_odr under -fms-compatibilityDavid Majnemer2014-04-021-2/+3
| | | | | | | | | | | | | | | | | | | Summary: MSVC always emits inline functions marked with the extern storage class specifier. The result is something similar to the opposite of __attribute__((gnu_inline)). This extension is also available in C. This fixes PR19264. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3207 llvm-svn: 205485
* Disable llvm optimizations, but keep -O1 to test available_externally.Rafael Espindola2013-09-041-4/+4
| | | | llvm-svn: 189918
* Use %clang_cc1.Rafael Espindola2013-09-041-4/+4
| | | | llvm-svn: 189917
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-43/+43
| | | | | | tests fail. llvm-svn: 188447
* AST: Treat inline function declarations in -fms-compatibility as if it were ↵David Majnemer2013-08-011-0/+9
| | | | | | | | in C++ when in C mode This essentially fixes PR16766. llvm-svn: 187586
* FileCheck-ize test/CodeGen/inline.c.David Blaikie2013-01-051-47/+47
| | | | | | | A rather egregious example of the grep-style checking of old that I randomly came across. llvm-svn: 171631
* A number of test cases assume that an "int" parameter or return valueUlrich Weigand2012-10-241-3/+3
| | | | | | | | | | | | will be represented in the IR as a plain "i32" type. This causes the tests to spuriously fail on platforms where int is not a 32-bit type, or where the ABI requires attributes like "signext" or "zeroext" to be used. This patch adds -triple or -target parameters to force those tests to use the i386-unknown-unknown target. llvm-svn: 166551
* Make FunctionDecl::doesDeclarationForceExternallyVisibleDefinition use the ↵Eli Friedman2012-02-071-3/+28
| | | | | | same logic as FunctionDecl::isInlineDefinitionExternallyVisible to figure out whether to emit a definition. Based on work by Anton Yartsev. llvm-svn: 149963
* r149587 revertedAnton Yartsev2012-02-021-7/+9
| | | | llvm-svn: 149594
* Fix for PR10657 (http://llvm.org/bugs/show_bug.cgi?id=10657)Anton Yartsev2012-02-021-9/+7
| | | | | | extern inline case considered llvm-svn: 149587
* PR11062: Make C99 inlining work properly for names with associated builtin ↵Eli Friedman2011-10-111-1/+6
| | | | | | libcalls. llvm-svn: 141723
* Don't crash when codegen'ing an empty redecl of a function in C99 mode, whenNick Lewycky2011-07-181-0/+6
| | | | | | neither was inline. Fixes bug introduced in r135377. llvm-svn: 135380
* In C99, emit an inline function when encountering an extern redeclaration.Nick Lewycky2011-07-181-0/+7
| | | | | | Fixes PR10233! llvm-svn: 135377
* r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,Cameron Zwarich2011-07-071-7/+0
| | | | | | so roll it out. llvm-svn: 134638
* A redeclaration of an inline method in C99 mode should trigger emission of thatNick Lewycky2011-07-071-0/+7
| | | | | | function. Fixes PR10233! llvm-svn: 134634
* Fixed test case asserts due to checkin of r130710.Chad Rosier2011-05-021-1/+1
| | | | llvm-svn: 130720
* Reinstate the optimization suppressing available_externally functionsDouglas Gregor2010-07-131-3/+3
| | | | | | | | at -O0. The only change from the previous patch is that we don't try to generate virtual method thunks for an available_externally function. llvm-svn: 108230
* Speculatively revert r108156; it appears to be breaking self-host.Douglas Gregor2010-07-121-3/+3
| | | | llvm-svn: 108194
* Do not generate LLVM IR for available_externally function bodies atDouglas Gregor2010-07-121-3/+3
| | | | | | | | | | -O0, since we won't be using the definitions for anything anyway. For lib/System/Path.o when built in Debug+Asserts mode, this leads to a 4% improvement in compile time (and suppresses 440 function bodies). <rdar://problem/7987644> llvm-svn: 108156
* Update tests to use %clang instead of 'clang', and forcibly disable use of 'Daniel Dunbar2009-12-151-3/+3
| | | | | | | clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). llvm-svn: 91460
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-37/+37
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Rework the way we determine whether an externally visible symbol isDouglas Gregor2009-09-131-8/+6
| | | | | | | | generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. llvm-svn: 81670
* Prep for new warning.Mike Stump2009-07-211-0/+2
| | | | llvm-svn: 76638
* Improve compatibility with GCC regarding inline semantics in GNU89Douglas Gregor2009-04-281-2/+23
| | | | | | | | | | | mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. llvm-svn: 70292
* Simplify the scheme used for keywords, and change the classification Eli Friedman2009-04-281-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
* Fix handling of C99 "extern inline" semantics when dealing withDouglas Gregor2009-04-231-0/+18
| | | | | | | multiple declarations of the function. Should fix PR3989 and <rdar://problem/6818429>. llvm-svn: 69905
* Fix some mishandling of the attr(gnu_inline) mode when used withChris Lattner2009-04-221-1/+9
| | | | | | | | | | extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible llvm-svn: 69756
* the __gnuc_inline__ attribute is actually named __gnu_inline__,Chris Lattner2009-04-201-1/+1
| | | | | | PR4023 llvm-svn: 69618
* Fix PR3988: extern inline functions get strong symbol definitions inChris Lattner2009-04-141-3/+4
| | | | | | | | C99 mode. This is a regression from an earlier patch of mine. This also simplifies the linkage enums a bit. llvm-svn: 69069
* implement codegen support for __attribute((__gnuc_inline__)),Chris Lattner2009-04-141-1/+8
| | | | | | | | pulling some attribute munging stuff into GetLinkageForFunction. This should fix PR3986 llvm-svn: 69045
* defer emission of always_inline, extern_inline, and inline functions (when Chris Lattner2009-04-141-4/+6
| | | | | | not in c89 mode). llvm-svn: 69032
* set the linkage of an inline function according to its language rules.Chris Lattner2009-04-141-0/+29
llvm-svn: 69030
OpenPOWER on IntegriCloud