mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-19 03:38:26 +00:00
Forgot to commit this hunk
llvm-svn: 73693
This commit is contained in:
parent
e492bc7546
commit
82ab724191
@ -601,6 +601,18 @@ public:
|
||||
return CI;
|
||||
}
|
||||
|
||||
InvokeInst *TransferAttributes(InvokeInst *II, const Value* Callee) const {
|
||||
if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(Callee))
|
||||
Callee = GA->getAliasedGlobal();
|
||||
|
||||
if (const Function *F = dyn_cast<Function>(Callee)) {
|
||||
II->setCallingConv(F->getCallingConv());
|
||||
II->setAttributes(F->getAttributes());
|
||||
}
|
||||
|
||||
return II;
|
||||
}
|
||||
|
||||
CallInst *CreateCall(Value *Callee, const char *Name = "") {
|
||||
return Insert(TransferAttributes(CallInst::Create(Callee), Callee), Name);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user