diff options
author | Chris Lattner <sabre@nondot.org> | 2006-06-28 21:38:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-06-28 21:38:04 +0000 |
commit | c521409d4cf6c8edf4900dda36f6ef9b953f8951 (patch) | |
tree | eac81a52aafbb8516696a4f5b82ead38d8254078 /include | |
parent | b916ba1fe435494a0ea80ab109bcee01c0c67052 (diff) | |
download | external_llvm-c521409d4cf6c8edf4900dda36f6ef9b953f8951.zip external_llvm-c521409d4cf6c8edf4900dda36f6ef9b953f8951.tar.gz external_llvm-c521409d4cf6c8edf4900dda36f6ef9b953f8951.tar.bz2 |
Add support for hidden visibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/Visibility.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/llvm/Support/Visibility.h b/include/llvm/Support/Visibility.h new file mode 100644 index 0000000..eb0c649 --- /dev/null +++ b/include/llvm/Support/Visibility.h @@ -0,0 +1,23 @@ +//===-- llvm/Support/Visibility.h - visibility(hidden) support --*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Chris Lattner and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the VISIBILITY_HIDDEN macro, used for marking classes with +// the GCC-specific visibility("hidden") attribute. +// +//===----------------------------------------------------------------------===// + +#ifndef VISIBILITY_HIDDEN + +#if __GNUC__ >= 4 +#define VISIBILITY_HIDDEN __attribute__ ((visibility("hidden"))) +#else +#define VISIBILITY_HIDDEN +#endif + +#endif |