NAKAMURA Takumi
c26f35afea
include/llvm/Support/Compiler.h: Invalidate LLVM_ATTRIBUTE_WEAK on cygming for now.
...
It triggers generating insane executables with both binutils-2.19.1(msysgit) and 2.22.51.20111013(cygwin).
llvm-svn: 144621
2011-11-15 05:24:26 +00:00
Nick Lewycky
a68ade6ccc
Fix linking for some users who already have tsan enabled code and are trying to
...
link it against llvm code, by making our definitions weak. "Some users."
llvm-svn: 144596
2011-11-15 00:14:04 +00:00
Daniel Dunbar
e79d25dd7a
Support/Compiler: Add LLVM_EXTENSION for use where we want to hide pedantic diags.
...
llvm-svn: 143468
2011-11-01 17:46:12 +00:00
John McCall
cb1d6e9690
Version N of the llvm_unreachable patch: VC++ doesn't recognize that abort()
...
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.
llvm-svn: 127629
2011-03-14 22:41:50 +00:00
John McCall
952cbb2634
Okay, some compilers complain if you provide the exception-specification
...
where none was before. Just don't declare it and hope it's declared
in every translation unit that needs it.
llvm-svn: 127612
2011-03-14 20:20:29 +00:00
John McCall
46f704310d
Fix the exception-specification of abort() when declaring it in C++.
...
llvm-svn: 127610
2011-03-14 20:10:50 +00:00
John McCall
fe51bf5de7
Make llvm_unreachable evaluate to __builtin_unreachable() in -Asserts
...
builds, which was the apparent consensus of PR8973 and llvmdev.
llvm-svn: 127608
2011-03-14 20:01:21 +00:00
Michael J. Spencer
f2bf8518fb
Support/Path: Deprecate PathV1::isAbsolute.
...
llvm-svn: 122086
2010-12-17 21:21:31 +00:00
Duncan Sands
cfdc3382c9
Remove deprecated macro names. Hopefully this will unbreak the
...
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.
llvm-svn: 117260
2010-10-25 12:47:22 +00:00
Chandler Carruth
7dd652736f
Move the remaining attribute macros to systematic names based on the attribute
...
name and prefixed with 'LLVM_'.
llvm-svn: 117203
2010-10-23 08:40:19 +00:00
Chandler Carruth
7799a873bb
Switch attribute macros to use 'LLVM_' as a prefix. We retain the old names
...
until other LLVM projects using these are cleaned up.
llvm-svn: 117200
2010-10-23 08:10:43 +00:00
Chandler Carruth
7763c845be
Add a comment about ATTRIBUTE_UNUSED to avoid further confusion over when to
...
use it.
llvm-svn: 116920
2010-10-20 08:44:27 +00:00
Michael J. Spencer
2d26a21128
Support: Add __forceinline to Compiler.h on MSVC.
...
llvm-svn: 115595
2010-10-05 06:00:52 +00:00
Duncan Sands
e2be7b75b2
Remove LLVM_GLOBAL_VISIBILITY, which is unused, and was not working properly.
...
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.
llvm-svn: 113959
2010-09-15 08:09:55 +00:00
Duncan Sands
8797da600f
Define LLVM_GLOBAL_VISIBILITY to be __declspec(dllexport) on
...
windows systems.
llvm-svn: 112700
2010-09-01 13:07:11 +00:00
Duncan Sands
7d5e4152c3
I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename it
...
to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is
the opposite, for future use by dragonegg.
llvm-svn: 103495
2010-05-11 20:16:09 +00:00
Chris Lattner
acb553060b
don't use always_inline with gcc 3.4, it has some unimplemented features
...
and is too old to really care about the performance of the generated
compiler.
llvm-svn: 97662
2010-03-03 20:47:12 +00:00
Bill Wendling
baec6e54f4
Add an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which are
...
mainly used in debugging and/or assert situations. It should make the compiler
and the static analyzer stop nagging us about them.
llvm-svn: 92181
2009-12-28 01:20:29 +00:00
Chris Lattner
05651d4544
add an ALWAYS_INLINE macro, which does the obvious thing.
...
llvm-svn: 91416
2009-12-15 06:14:33 +00:00
Duncan Sands
bebe645914
Following a suggestion of Daniel Dunbar, stop people passing the name
...
as the isSigned bool to CreateIntCast by having this resolve to a call
to a private method, rather than by using a gcc attribute.
llvm-svn: 89067
2009-11-17 08:34:52 +00:00
Douglas Gregor
a92bd85bea
Make ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCs
...
llvm-svn: 88916
2009-11-16 16:56:48 +00:00
Duncan Sands
d67a1e3fa8
Make sure that if anyone passes a name by accident for the isSigned
...
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*.
llvm-svn: 88913
2009-11-16 15:28:17 +00:00
Chris Lattner
5bbbe72be5
add attributes for readnone/readonly functions.
...
llvm-svn: 88862
2009-11-15 19:54:31 +00:00
Benjamin Kramer
e9ba686ab8
Implement DISABLE_INLINE for MSVC. This required changing the position in all
...
forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi!
llvm-svn: 88798
2009-11-14 16:37:18 +00:00
Benjamin Kramer
521985553a
Make NORETURN working with MSVC. MSVC only accepts NORETURN in front of the
...
decl so move it there. GCC accepts it both in front and after decls.
llvm-svn: 88791
2009-11-14 14:14:58 +00:00
Julien Lerouge
2f6ea4ae21
Use __attribute__((__used__)) if GCC >= 3.1 (seems to be the oldest GCC
...
supporting this attribute).
llvm-svn: 82177
2009-09-17 23:27:10 +00:00
Torok Edwin
375564339a
Introduce new error handling API.
...
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.
llvm-svn: 74922
2009-07-07 17:32:34 +00:00
Daniel Dunbar
7c9dba0950
Add BUILTIN_EXPECT Support/Compiler macro.
...
- Use for exceptional buffer conditions in raw_ostream:write to shave
off a cycle or two.
- Please rename if you have a better one.
llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Anton Korobeynikov
d47d0bc96c
Symbol visibility is unsupported on cygwin too.
...
Patch by Jay Foad!
llvm-svn: 58520
2008-10-31 18:05:01 +00:00
Devang Patel
a6c5ff690a
Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
...
llvm-svn: 53692
2008-07-16 17:54:34 +00:00
Anton Korobeynikov
67f0de9810
Silence a warning. Should we turn this into configure-time check?
...
llvm-svn: 46251
2008-01-22 11:01:23 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
db0a995bbe
add directive to disable inlining
...
llvm-svn: 29912
2006-08-27 13:16:05 +00:00
Chris Lattner
a72e220a25
New place to put compiler-specific functionality. This replaces Visibility.h,
...
and provides macros that can be used to make explicit instantiations of
template specializations, which is a gcc-specific feature.
llvm-svn: 29908
2006-08-27 12:42:45 +00:00