[CodeExtractor] Remove unnecessary explicit attribute handling (NFC)

The nounwind and uwtable attributes will get handled as part of
the loop below as well, there is no need to special-case them here.
This commit is contained in:
Nikita Popov 2022-01-03 14:11:56 +01:00
parent b5c84626bb
commit 730414b341
1 changed files with 0 additions and 7 deletions

View File

@ -871,13 +871,6 @@ Function *CodeExtractor::constructFunction(const ValueSet &inputs,
Function *newFunction = Function::Create(
funcType, GlobalValue::InternalLinkage, oldFunction->getAddressSpace(),
oldFunction->getName() + "." + SuffixToUse, M);
// If the old function is no-throw, so is the new one.
if (oldFunction->doesNotThrow())
newFunction->setDoesNotThrow();
// Inherit the uwtable attribute if we need to.
if (oldFunction->hasUWTable())
newFunction->setHasUWTable();
// Inherit all of the target dependent attributes and white-listed
// target independent attributes.