search for: gvar_ptr_abc

Displaying 2 results from an estimated 2 matches for "gvar_ptr_abc".

2019 Jan 29
2
[cfe-dev] Create a BlockAddress array from LLVM Pass
...e done following to create the same array from LLVM pass. > > > > std::vector<BlockAddress *> tmp; > > Function *fn = ... > > BasicBlock *bb = ... > > > BlockAddress *bba = BlockAddress::get(fn, bb); > > tmp.push_back(bba); > > > GlobalVariable *gvar_ptr_abc = new GlobalVariable( > > /*Module=*/*fn->getParent(), > > /*Type=*/PointerTy, > > /*isConstant=*/false, > > /*Linkage=*/GlobalValue::InternalLinkage, > > /*Initializer=*/0, // has initializer, specified below > > /*Name=*/"labelTracker"); > >...
2019 Jan 28
2
Create a BlockAddress array from LLVM Pass
...quot;data", align 16 Here the array elements are labels in c code. I have done following to create the same array from LLVM pass. std::vector<BlockAddress *> tmp; Function *fn = ... BasicBlock *bb = ... BlockAddress *bba = BlockAddress::get(fn, bb); tmp.push_back(bba); GlobalVariable *gvar_ptr_abc = new GlobalVariable( /*Module=*/*fn->getParent(), /*Type=*/PointerTy, /*isConstant=*/false, /*Linkage=*/GlobalValue::InternalLinkage, /*Initializer=*/0, // has initializer, specified below /*Name=*/"labelTracker"); gvar_ptr_abc->setAlignment(16); Constant *blockItems = ConstantData...