[Orc] Make the makeStub function propagate argument attributes onto the call to

the function body.

This is necessary for correctness when lazily compiling.

Also, flesh out the Orc unit test infrastructure slightly, and add a unit test
for this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2015-04-20 20:41:45 +00:00
parent 878f959d7f
commit 302f000bf4
5 changed files with 140 additions and 0 deletions

View File

@ -49,6 +49,7 @@ void makeStub(Function &F, GlobalVariable &ImplPointer) {
CallArgs.push_back(&A);
CallInst *Call = Builder.CreateCall(ImplAddr, CallArgs);
Call->setTailCall();
Call->setAttributes(F.getAttributes());
Builder.CreateRet(Call);
}