search for: inittest

Displaying 1 result from an estimated 1 matches for "inittest".

Did you mean: unittest
2009 Mar 11
3
[LLVMdev] opt -O2/-O3 does not Initialize pass?
...nter in a global variable. If I run opt with "-O1" or less, everything works fine. However, If I call opt with "-O2" or "-O3" then as soon as runOnFunction() is called, the pointer seems to be NULL. Here is a code that shows the problem: namespace { struct InitTest : public FunctionPass { Constant *someF; public: static char ID; // Pass identification, replacement for typeid InitTest() : FunctionPass(&ID) {} virtual bool doInitialization(Module &mdl) { someF = mdl.getOrInsertFunction("test",...