This is an archive of the discontinued LLVM Phabricator instance.

Allow Sparc back-end to take the address of a function (or other global object)
ClosedPublic

Authored by lero_chris on Apr 21 2016, 8:36 AM.

Details

Summary

The following code would not work before this patch, due to the inability to take the address of a global object:

void func1() {

...

}

int main(int argc, char** argv) {

void (*pFunc)();
pFunc = &func1
pFunc();
...

}

Diff Detail

Repository
rL LLVM

Event Timeline

lero_chris updated this revision to Diff 54513.Apr 21 2016, 8:36 AM
lero_chris retitled this revision from to Allow Sparc back-end to take the address of a function (or other global object).
lero_chris updated this object.
lero_chris added a reviewer: jacob_hansen.
lero_chris set the repository for this revision to rL LLVM.
jacob_hansen accepted this revision.Apr 22 2016, 1:01 AM
jacob_hansen edited edge metadata.

This looks good for me (not sure I can formally accept it as I do not yet have SVN write access though).

This revision is now accepted and ready to land.Apr 22 2016, 1:01 AM
lero_chris closed this revision.Apr 22 2016, 1:14 AM
lero_chris updated this revision to Diff 56129.May 4 2016, 5:14 AM
lero_chris edited edge metadata.

Unit tests to go with this change.