aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/IncludeFile.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-06-07 22:00:26 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-06-07 22:00:26 +0000
commit4f1bd9e9963239c119db70070db1d68286b3de7e (patch)
treed1606a0f29f57d16f5db895bb11a151a83cf0f11 /include/llvm/Support/IncludeFile.h
parent6296b3cac5448afe910e9dd7953fb10082721c77 (diff)
downloadexternal_llvm-4f1bd9e9963239c119db70070db1d68286b3de7e.zip
external_llvm-4f1bd9e9963239c119db70070db1d68286b3de7e.tar.gz
external_llvm-4f1bd9e9963239c119db70070db1d68286b3de7e.tar.bz2
For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace 2. Replace the previous explicit mechanism in all the .h and .cpp files with the macros in IncludeFile.h This gets us a consistent mechanism throughout LLVM for ensuring linkage. Next step is to make sure its used in enough places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/IncludeFile.h')
-rw-r--r--include/llvm/Support/IncludeFile.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Support/IncludeFile.h b/include/llvm/Support/IncludeFile.h
index 8e96f75..798c6b4 100644
--- a/include/llvm/Support/IncludeFile.h
+++ b/include/llvm/Support/IncludeFile.h
@@ -27,13 +27,15 @@
/// And, foo.cp would use:<br/>
/// <tt>DEFINING_FILE_FOR(foo)</tt><br/>
#define FORCE_DEFINING_FILE_TO_BE_LINKED(name) \
- extern char name ## LinkVar; \
- static IncludeFile name ## LinkObj ( &name ## LinkVar )
+ namespace llvm { \
+ extern char name ## LinkVar; \
+ static IncludeFile name ## LinkObj ( &name ## LinkVar ); \
+ }
/// This macro is the counterpart to FORCE_DEFINING_FILE_TO_BE_LINKED. It should
/// be used in a .cpp file to define the name referenced in a header file that
/// will cause linkage of the .cpp file. It should only be used at extern level.
-#define DEFINING_FILE_FOR(name) char name
+#define DEFINING_FILE_FOR(name) namespace llvm { char name ## LinkVar; }
namespace llvm {