mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Take advantage of Triple and TargetData.
A lot of system specific knowledge is already present in LLVM. This is used to populate several fields in global.params instead of hard coded values in main(). Ensures that the frontend and LLVM have always the same values.
This commit is contained in:
@@ -242,7 +242,7 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
|
||||
sir->setState(&ir);
|
||||
|
||||
// set target triple
|
||||
ir.module->setTargetTriple(global.params.targetTriple);
|
||||
ir.module->setTargetTriple(global.params.targetTriple.str());
|
||||
|
||||
// set final data layout
|
||||
ir.module->setDataLayout(gTargetData->getStringRepresentation());
|
||||
|
||||
Reference in New Issue
Block a user