summaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend
diff options
context:
space:
mode:
authorNico Rieck <nico.rieck@gmail.com>2014-01-14 12:38:32 +0000
committerNico Rieck <nico.rieck@gmail.com>2014-01-14 12:38:32 +0000
commit55463f4ec19618207dcf07016ad6aa1def429dc4 (patch)
tree0b3bb45fe7076f7ca661939a405b8c49c3a18631 /lib/Target/CppBackend
parent62b811443db32e55b37370b421e0f34454417b47 (diff)
downloadllvm-55463f4ec19618207dcf07016ad6aa1def429dc4.tar.gz
Revert "Decouple dllexport/dllimport from linkage"
Revert this for now until I fix an issue in Clang with it. This reverts commit r199204. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp34
1 files changed, 4 insertions, 30 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index b13709914bf6..6e2dd0a8e7b2 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -131,7 +131,6 @@ namespace {
private:
void printLinkageType(GlobalValue::LinkageTypes LT);
void printVisibilityType(GlobalValue::VisibilityTypes VisTypes);
- void printDLLStorageClassType(GlobalValue::DLLStorageClassTypes DSCType);
void printThreadLocalMode(GlobalVariable::ThreadLocalMode TLM);
void printCallingConv(CallingConv::ID cc);
void printEscapedString(const std::string& str);
@@ -301,6 +300,10 @@ void CppWriter::printLinkageType(GlobalValue::LinkageTypes LT) {
Out << "GlobalValue::AppendingLinkage"; break;
case GlobalValue::ExternalLinkage:
Out << "GlobalValue::ExternalLinkage"; break;
+ case GlobalValue::DLLImportLinkage:
+ Out << "GlobalValue::DLLImportLinkage"; break;
+ case GlobalValue::DLLExportLinkage:
+ Out << "GlobalValue::DLLExportLinkage"; break;
case GlobalValue::ExternalWeakLinkage:
Out << "GlobalValue::ExternalWeakLinkage"; break;
case GlobalValue::CommonLinkage:
@@ -322,21 +325,6 @@ void CppWriter::printVisibilityType(GlobalValue::VisibilityTypes VisType) {
}
}
-void CppWriter::printDLLStorageClassType(
- GlobalValue::DLLStorageClassTypes DSCType) {
- switch (DSCType) {
- case GlobalValue::DefaultStorageClass:
- Out << "GlobalValue::DefaultStorageClass";
- break;
- case GlobalValue::DLLImportStorageClass:
- Out << "GlobalValue::DLLImportStorageClass";
- break;
- case GlobalValue::DLLExportStorageClass:
- Out << "GlobalValue::DLLExportStorageClass";
- break;
- }
-}
-
void CppWriter::printThreadLocalMode(GlobalVariable::ThreadLocalMode TLM) {
switch (TLM) {
case GlobalVariable::NotThreadLocal:
@@ -1040,13 +1028,6 @@ void CppWriter::printVariableHead(const GlobalVariable *GV) {
Out << ");";
nl(Out);
}
- if (GV->getDLLStorageClass() != GlobalValue::DefaultStorageClass) {
- printCppName(GV);
- Out << "->setDLLStorageClass(";
- printDLLStorageClassType(GV->getDLLStorageClass());
- Out << ");";
- nl(Out);
- }
if (GV->isThreadLocal()) {
printCppName(GV);
Out << "->setThreadLocalMode(";
@@ -1765,13 +1746,6 @@ void CppWriter::printFunctionHead(const Function* F) {
Out << ");";
nl(Out);
}
- if (F->getDLLStorageClass() != GlobalValue::DefaultStorageClass) {
- printCppName(F);
- Out << "->setDLLStorageClass(";
- printDLLStorageClassType(F->getDLLStorageClass());
- Out << ");";
- nl(Out);
- }
if (F->hasGC()) {
printCppName(F);
Out << "->setGC(\"" << F->getGC() << "\");";