mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86 assembler backends. External weak linkage added for future use, we don't provide any codegeneration, etc. support for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1245,7 +1245,7 @@ static Constant *getVal(std::map<Value*, Constant*> &ComputedValues,
|
||||
static bool isSimpleEnoughPointerToCommit(Constant *C) {
|
||||
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) {
|
||||
if (!GV->hasExternalLinkage() && !GV->hasInternalLinkage())
|
||||
return false; // do not allow weak/linkonce linkage.
|
||||
return false; // do not allow weak/linkonce/dllimport/dllexport linkage.
|
||||
return !GV->isExternal(); // reject external globals.
|
||||
}
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
|
||||
@@ -1254,7 +1254,7 @@ static bool isSimpleEnoughPointerToCommit(Constant *C) {
|
||||
isa<GlobalVariable>(CE->getOperand(0))) {
|
||||
GlobalVariable *GV = cast<GlobalVariable>(CE->getOperand(0));
|
||||
if (!GV->hasExternalLinkage() && !GV->hasInternalLinkage())
|
||||
return false; // do not allow weak/linkonce linkage.
|
||||
return false; // do not allow weak/linkonce/dllimport/dllexport linkage.
|
||||
return GV->hasInitializer() &&
|
||||
ConstantFoldLoadThroughGEPConstantExpr(GV->getInitializer(), CE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user