mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 17:43:35 +03:00
Fix a typo in variable name
This commit is contained in:
parent
bdd346c3ae
commit
f4e2d8486b
1 changed files with 8 additions and 8 deletions
|
@ -340,13 +340,13 @@ static LLFunction* build_module_reference_and_ctor(LLConstant* moduleinfo)
|
|||
///
|
||||
/// Pseudocode:
|
||||
/// if (dsoInitialized == executeWhenInitialized) {
|
||||
/// dsoInitiaized = !executeWhenInitialized;
|
||||
/// dsoInitialized = !executeWhenInitialized;
|
||||
/// auto record = {1, dsoSlot, minfoBeg, minfoEnd, minfoUsedPointer};
|
||||
/// _d_dso_registry(cast(CompilerDSOData*)&record);
|
||||
/// }
|
||||
static void build_dso_ctor_dtor_body(
|
||||
llvm::Function* targetFunc,
|
||||
llvm::Value* dsoInitiaized,
|
||||
llvm::Value* dsoInitialized,
|
||||
llvm::Value* dsoSlot,
|
||||
llvm::Value* minfoBeg,
|
||||
llvm::Value* minfoEnd,
|
||||
|
@ -368,13 +368,13 @@ static void build_dso_ctor_dtor_body(
|
|||
IRBuilder<> b(entryBB);
|
||||
llvm::Value* condEval = b.CreateICmp(executeWhenInitialized ? llvm::ICmpInst::ICMP_NE
|
||||
: llvm::ICmpInst::ICMP_EQ,
|
||||
b.CreateLoad(dsoInitiaized),
|
||||
b.CreateLoad(dsoInitialized),
|
||||
b.getInt8(0));
|
||||
b.CreateCondBr(condEval, initBB, endBB);
|
||||
}
|
||||
{
|
||||
IRBuilder<> b(initBB);
|
||||
b.CreateStore(b.getInt8(!executeWhenInitialized), dsoInitiaized);
|
||||
b.CreateStore(b.getInt8(!executeWhenInitialized), dsoInitialized);
|
||||
|
||||
llvm::Constant* version = DtoConstSize_t(1);
|
||||
llvm::Type* memberTypes[] = {
|
||||
|
@ -488,7 +488,7 @@ static void build_dso_registry_calls(llvm::Constant* thisModuleInfo)
|
|||
// problems. This would mean that it is no longer safe to link D objects
|
||||
// directly using e.g. "g++ dcode.o cppcode.o", though.
|
||||
|
||||
llvm::GlobalVariable* dsoInitiaized = new llvm::GlobalVariable(
|
||||
llvm::GlobalVariable* dsoInitialized = new llvm::GlobalVariable(
|
||||
*gIR->module,
|
||||
llvm::Type::getInt8Ty(gIR->context()),
|
||||
false,
|
||||
|
@ -496,7 +496,7 @@ static void build_dso_registry_calls(llvm::Constant* thisModuleInfo)
|
|||
llvm::ConstantInt::get(llvm::Type::getInt8Ty(gIR->context()), 0),
|
||||
"ldc.dso_initialized"
|
||||
);
|
||||
dsoInitiaized->setVisibility(llvm::GlobalValue::HiddenVisibility);
|
||||
dsoInitialized->setVisibility(llvm::GlobalValue::HiddenVisibility);
|
||||
|
||||
// There is no reason for this cast to void*, other than that removing it
|
||||
// seems to trigger a bug in the llvm::Linker (at least on LLVM 3.4)
|
||||
|
@ -514,7 +514,7 @@ static void build_dso_registry_calls(llvm::Constant* thisModuleInfo)
|
|||
gIR->module
|
||||
);
|
||||
dsoCtor->setVisibility(llvm::GlobalValue::HiddenVisibility);
|
||||
build_dso_ctor_dtor_body(dsoCtor, dsoInitiaized, dsoSlot, minfoBeg, minfoEnd, minfoRefPtr, false);
|
||||
build_dso_ctor_dtor_body(dsoCtor, dsoInitialized, dsoSlot, minfoBeg, minfoEnd, minfoRefPtr, false);
|
||||
llvm::appendToGlobalCtors(*gIR->module, dsoCtor, 65535);
|
||||
|
||||
llvm::Function* dsoDtor = llvm::Function::Create(
|
||||
|
@ -524,7 +524,7 @@ static void build_dso_registry_calls(llvm::Constant* thisModuleInfo)
|
|||
gIR->module
|
||||
);
|
||||
dsoDtor->setVisibility(llvm::GlobalValue::HiddenVisibility);
|
||||
build_dso_ctor_dtor_body(dsoDtor, dsoInitiaized, dsoSlot, minfoBeg, minfoEnd, minfoRefPtr, true);
|
||||
build_dso_ctor_dtor_body(dsoDtor, dsoInitialized, dsoSlot, minfoBeg, minfoEnd, minfoRefPtr, true);
|
||||
llvm::appendToGlobalDtors(*gIR->module, dsoDtor, 65535);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue