Displaying 2 results from an estimated 2 matches for "setdsolocal".
2019 Feb 22
1
Create the GlobalVariable which have extern in one header file
...ther global variable instead of linking? Is that because of array size mismatch?
Here is my code:
GlobalVariable *old = M.getGlobalVariable("DATA_TABLE");
old->setAlignment(16);
old->setSection("data_section");
old->addAttribute(llvm::Attribute::OptimizeNone);
old->setDSOLocal(false);
GlobalVariable *gNew = new GlobalVariable(
M, blockItems->getType(), false, GlobalValue::ExternalLinkage,
blockItems, "DATA_TABLE");
gNew->setAlignment(16);
gNew->setSection("data_section");
gNew->addAttribute(llvm::Attribute::OptimizeNone);
On Feb 22 2019,...
2019 Feb 22
2
Create the GlobalVariable which have extern in one header file
Hi
Good day. I am facing issue with creating a GlobalVariable. I already have an extern for that global in a header file to use it in the following way
extern const void* DATA_TABLE[];
And with a LLVM PASS, I am trying to create this array with the same name and with initializer. So, I have following:
GlobalVariable *gvar_data = new GlobalVariable(
M, blockItems->getType(), true,