Revert lldb change for Attribute::NoBuiltin

NoBuiltin was introduced after clang/llvm 3.3 and thus does not exist in
FreeBSD.  Thus special handling for the attribute is not needed in lldb.

This reverts lldb r186990 (git eebd175)

Sponsored by:	DARPA, AFRL
This commit is contained in:
Ed Maste 2013-08-24 16:09:52 +00:00
parent e3b7062fce
commit 3979636f6f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254793

View File

@ -356,20 +356,6 @@ IRForTarget::ResolveFunctionPointers(llvm::Module &llvm_module)
if (value_ptr)
*value_ptr = value;
// If we are replacing a function with the nobuiltin attribute, it may
// be called with the builtin attribute on call sites. Remove any such
// attributes since it's illegal to have a builtin call to something
// other than a nobuiltin function.
if (fun->hasFnAttribute(Attribute::NoBuiltin)) {
Attribute builtin = Attribute::get(fun->getContext(), Attribute::Builtin);
for (auto u = fun->use_begin(), e = fun->use_end(); u != e; ++u) {
if (auto call = dyn_cast<CallInst>(*u)) {
call->removeAttribute(AttributeSet::FunctionIndex, builtin);
}
}
}
fun->replaceAllUsesWith(value);
}