search for: myothercallback

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

2010 Jun 04
3
[LLVMdev] Is there a "callback optimization"?
By that I mean an optimization pass (or a combination of them) that turns: void useCallback(void (*callbackfn)()) { // Do something callbackfn(); // Do something else } void myCallback() { // Respond one way } void myOtherCallback() { // Respond another way } void foo() { useCallback(myCallback); useCallback(myOtherCallback); } into: // Keep the original; it'll get removed // by other passes if it's nonpublic and dead. void useCallback(void (*callbackfn)()) { // Do something callbackfn(); // Do something else }...