summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Compiler.h
Commit message (Collapse)AuthorAge
* Version N of the llvm_unreachable patch: VC++ doesn't recognize that abort()John McCall2011-03-14
| | | | | | | | | | doesn't return, so just go back to using the old runtime function instead of trying to use abort() when __builtin_unreachable (or an equivalent) isn't supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127629 91177308-0d34-0410-b5e6-96231b3b80d8
* Okay, some compilers complain if you provide the exception-specificationJohn McCall2011-03-14
| | | | | | | | | where none was before. Just don't declare it and hope it's declared in every translation unit that needs it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127612 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the exception-specification of abort() when declaring it in C++.John McCall2011-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127610 91177308-0d34-0410-b5e6-96231b3b80d8
* Make llvm_unreachable evaluate to __builtin_unreachable() in -AssertsJohn McCall2011-03-14
| | | | | | | | builds, which was the apparent consensus of PR8973 and llvmdev. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127608 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Path: Deprecate PathV1::isAbsolute.Michael J. Spencer2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122086 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove deprecated macro names. Hopefully this will unbreak theDuncan Sands2010-10-25
| | | | | | | | | smooshlab build. The breakage seems to be due to a collision between LLVM's ATTRIBUTE_UNUSED and gcc's which was previously hidden due to header files being included in a lucky order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117260 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the remaining attribute macros to systematic names based on the attributeChandler Carruth2010-10-23
| | | | | | | name and prefixed with 'LLVM_'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117203 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch attribute macros to use 'LLVM_' as a prefix. We retain the old namesChandler Carruth2010-10-23
| | | | | | | until other LLVM projects using these are cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117200 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment about ATTRIBUTE_UNUSED to avoid further confusion over when toChandler Carruth2010-10-20
| | | | | | | use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116920 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: Add __forceinline to Compiler.h on MSVC.Michael J. Spencer2010-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115595 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove LLVM_GLOBAL_VISIBILITY, which is unused, and was not working properly.Duncan Sands2010-09-15
| | | | | | | | | | | | | | The problem was that the test for whether a compiler supports it or not was inaccurate, but has to be accurate: LLVM_LOCAL_VISIBILITY is an optimization and not needed for correctness, so wrongly thinking a compiler doesn't support it is not a big deal, but LLVM_GLOBAL_VISIBILITY is for correctness, and not an optimization: getting it wrong is fatal: it needs to be set based on a configure test not testing the gcc version. Since dragonegg has moved to a different scheme, and it was the only user of LLVM_GLOBAL_VISIBILITY, just remove this macro. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113959 91177308-0d34-0410-b5e6-96231b3b80d8
* Define LLVM_GLOBAL_VISIBILITY to be __declspec(dllexport) onDuncan Sands2010-09-01
| | | | | | | windows systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112700 91177308-0d34-0410-b5e6-96231b3b80d8
* I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename itDuncan Sands2010-05-11
| | | | | | | | to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is the opposite, for future use by dragonegg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103495 91177308-0d34-0410-b5e6-96231b3b80d8
* don't use always_inline with gcc 3.4, it has some unimplemented featuresChris Lattner2010-03-03
| | | | | | | | and is too old to really care about the performance of the generated compiler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97662 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which areBill Wendling2009-12-28
| | | | | | | | mainly used in debugging and/or assert situations. It should make the compiler and the static analyzer stop nagging us about them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92181 91177308-0d34-0410-b5e6-96231b3b80d8
* add an ALWAYS_INLINE macro, which does the obvious thing.Chris Lattner2009-12-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91416 91177308-0d34-0410-b5e6-96231b3b80d8
* Following a suggestion of Daniel Dunbar, stop people passing the nameDuncan Sands2009-11-17
| | | | | | | | as the isSigned bool to CreateIntCast by having this resolve to a call to a private method, rather than by using a gcc attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89067 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCsDouglas Gregor2009-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88916 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that if anyone passes a name by accident for the isSignedDuncan Sands2009-11-16
| | | | | | | | | | | parameter of CreateIntCast then they get an error from the compiler (or from the linker with a non-gcc compiler). Another possibility is to flip the order of the DestTy and isSigned parameters, since you should then get a compiler warning if you try to use a char* for a Type*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88913 91177308-0d34-0410-b5e6-96231b3b80d8
* add attributes for readnone/readonly functions.Chris Lattner2009-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88862 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement DISABLE_INLINE for MSVC. This required changing the position in allBenjamin Kramer2009-11-14
| | | | | | | forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88798 91177308-0d34-0410-b5e6-96231b3b80d8
* Make NORETURN working with MSVC. MSVC only accepts NORETURN in front of theBenjamin Kramer2009-11-14
| | | | | | | decl so move it there. GCC accepts it both in front and after decls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88791 91177308-0d34-0410-b5e6-96231b3b80d8
* Use __attribute__((__used__)) if GCC >= 3.1 (seems to be the oldest GCCJulien Lerouge2009-09-17
| | | | | | | supporting this attribute). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82177 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce new error handling API.Torok Edwin2009-07-07
| | | | | | | | | This will replace exit()/abort() style error handling with an API that allows clients to register custom error handling hooks. The default is to call exit(1) when no error handler is provided. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74922 91177308-0d34-0410-b5e6-96231b3b80d8
* Add BUILTIN_EXPECT Support/Compiler macro.Daniel Dunbar2009-03-17
| | | | | | | | | | - Use for exceptional buffer conditions in raw_ostream:write to shave off a cycle or two. - Please rename if you have a better one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67103 91177308-0d34-0410-b5e6-96231b3b80d8
* Symbol visibility is unsupported on cygwin too.Anton Korobeynikov2008-10-31
| | | | | | Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58520 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark function used by asm block as used, otherwise optimizer may not see the ↵Devang Patel2008-07-16
| | | | | | use and may delete the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53692 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a warning. Should we turn this into configure-time check?Anton Korobeynikov2008-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46251 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-29
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* add directive to disable inliningChris Lattner2006-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29912 91177308-0d34-0410-b5e6-96231b3b80d8
* New place to put compiler-specific functionality. This replaces Visibility.h,Chris Lattner2006-08-27
and provides macros that can be used to make explicit instantiations of template specializations, which is a gcc-specific feature. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29908 91177308-0d34-0410-b5e6-96231b3b80d8