[cfe-commits] r116184 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Sun Oct 10 19:30:57 PDT 2010
Author: chapuni
Date: Sun Oct 10 21:30:56 2010
New Revision: 116184
URL: http://llvm.org/viewvc/llvm-project?rev=116184&view=rev
Log:
lib/CodeGen/CodeGenModule.cpp: DLLImportLinkage should be processed also on declaration.
It enables clang to compile Mingw's headers.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=116184&r1=116183&r2=116184&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sun Oct 10 21:30:56 2010
@@ -974,7 +974,9 @@
if (D->getStorageClass() == SC_PrivateExtern)
GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
- if (D->hasAttr<WeakAttr>() ||
+ if (D->hasAttr<DLLImportAttr>())
+ GV->setLinkage(llvm::GlobalValue::DLLImportLinkage);
+ else if (D->hasAttr<WeakAttr>() ||
D->hasAttr<WeakImportAttr>())
GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
More information about the cfe-commits
mailing list