search for: visitglobalvari

Displaying 4 results from an estimated 4 matches for "visitglobalvari".

2020 Jan 29
2
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
In this function (used to check the size of a global) there is an initial check for whether the initializer to this function is "definitive." My question is: why do we need this? How does the object's size change if a global's initializer is defined at link time? Thanks, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL:
2020 Jan 30
3
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
Interesting, so I guess we can check for whether it's an array type and adjust accordingly instead? Blocking *all* global variables without definitive initializers feels a bit much to me, especially if they have primitive types (i.e. integers) that don't have the potential to be screwed around with like this. On Wed, Jan 29, 2020 at 8:14 PM George Burgess IV < george.burgess.iv at
2016 Aug 24
2
Change GlobalValue Type/Initializer
...est0A\00”. Is this possible? I know that you can change the initializer with setInitializer but the global value’s type will not be the same. For now, the only way I found was to create a new global value and to change all theses uses. The second problem that I have is with the function Verifier::visitGlobalVariable. Sometimes, the verifier tells me that the initializer type does not match the global variable type even when this is the case. This function will do the following check: if (GV.hasInitializer()) { Assert(GV.getInitializer()->getType() == GV.getType()->getElementType(),...
2016 Aug 24
2
Change GlobalValue Type/Initializer
...now, the only way I found was to create a new global value and to change all theses uses. > > That’s the right thing to do: you need to create a new GV and replace the old one with the new one. > > > >> >> The second problem that I have is with the function Verifier::visitGlobalVariable. Sometimes, the verifier tells me that the initializer type does not match the global variable type even when this is the case. >> >> This function will do the following check: >> >> if (GV.hasInitializer()) { >> Assert(GV.getInitializer()->getType() ==...