comparison gen/toobj.c @ 26:99737f94abfb trunk

[svn r30] * Fixed static function-local variables. * Fixed CondExp - bool ? true : false
author lindquist
date Thu, 04 Oct 2007 10:57:26 +0200
parents 25bb577878e8
children 1c80c18f3c82
comparison
equal deleted inserted replaced
25:12fd8ce55d9c 26:99737f94abfb
503 503
504 // global variable or magic 504 // global variable or magic
505 if (isDataseg()) 505 if (isDataseg())
506 { 506 {
507 bool _isconst = isConst(); 507 bool _isconst = isConst();
508 if (!_isconst) 508
509 _isconst = (storage_class & STCconst) ? true : false; // doesn't seem to work ): 509 llvm::GlobalValue::LinkageTypes _linkage;
510 llvm::GlobalValue::LinkageTypes _linkage = LLVM_DtoLinkage(protection, storage_class); 510 if (parent->isFuncDeclaration())
511 _linkage = llvm::GlobalValue::InternalLinkage;
512 else
513 _linkage = LLVM_DtoLinkage(protection, storage_class);
514
511 const llvm::Type* _type = LLVM_DtoType(type); 515 const llvm::Type* _type = LLVM_DtoType(type);
512 assert(_type); 516 assert(_type);
513 517
514 llvm::Constant* _init = 0; 518 llvm::Constant* _init = 0;
515 bool _signed = !type->isunsigned(); 519 bool _signed = !type->isunsigned();