Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/AsmParser/LLParser.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | if (Function *Fn = dyn_cast<Function>(V)) { | ||||
AttrBuilder FnAttrs(M->getContext(), AS.getFnAttrs()); | AttrBuilder FnAttrs(M->getContext(), AS.getFnAttrs()); | ||||
AS = AS.removeFnAttributes(Context); | AS = AS.removeFnAttributes(Context); | ||||
FnAttrs.merge(B); | FnAttrs.merge(B); | ||||
// If the alignment was parsed as an attribute, move to the alignment | // If the alignment was parsed as an attribute, move to the alignment | ||||
// field. | // field. | ||||
if (MaybeAlign A = FnAttrs.getAlignment()) { | if (MaybeAlign A = FnAttrs.getAlignment()) { | ||||
Fn->setAlignment(A); | Fn->setAlignment(*A); | ||||
FnAttrs.removeAttribute(Attribute::Alignment); | FnAttrs.removeAttribute(Attribute::Alignment); | ||||
} | } | ||||
AS = AS.addFnAttributes(Context, FnAttrs); | AS = AS.addFnAttributes(Context, FnAttrs); | ||||
Fn->setAttributes(AS); | Fn->setAttributes(AS); | ||||
} else if (CallInst *CI = dyn_cast<CallInst>(V)) { | } else if (CallInst *CI = dyn_cast<CallInst>(V)) { | ||||
AttributeList AS = CI->getAttributes(); | AttributeList AS = CI->getAttributes(); | ||||
AttrBuilder FnAttrs(M->getContext(), AS.getFnAttrs()); | AttrBuilder FnAttrs(M->getContext(), AS.getFnAttrs()); | ||||
▲ Show 20 Lines • Show All 5,880 Lines • ▼ Show 20 Lines | bool LLParser::parseFunctionHeader(Function *&Fn, bool IsDefine) { | ||||
Fn->setLinkage((GlobalValue::LinkageTypes)Linkage); | Fn->setLinkage((GlobalValue::LinkageTypes)Linkage); | ||||
maybeSetDSOLocal(DSOLocal, *Fn); | maybeSetDSOLocal(DSOLocal, *Fn); | ||||
Fn->setVisibility((GlobalValue::VisibilityTypes)Visibility); | Fn->setVisibility((GlobalValue::VisibilityTypes)Visibility); | ||||
Fn->setDLLStorageClass((GlobalValue::DLLStorageClassTypes)DLLStorageClass); | Fn->setDLLStorageClass((GlobalValue::DLLStorageClassTypes)DLLStorageClass); | ||||
Fn->setCallingConv(CC); | Fn->setCallingConv(CC); | ||||
Fn->setAttributes(PAL); | Fn->setAttributes(PAL); | ||||
Fn->setUnnamedAddr(UnnamedAddr); | Fn->setUnnamedAddr(UnnamedAddr); | ||||
Fn->setAlignment(MaybeAlign(Alignment)); | Fn->setAlignment(Alignment); | ||||
Fn->setSection(Section); | Fn->setSection(Section); | ||||
Fn->setPartition(Partition); | Fn->setPartition(Partition); | ||||
Fn->setComdat(C); | Fn->setComdat(C); | ||||
Fn->setPersonalityFn(PersonalityFn); | Fn->setPersonalityFn(PersonalityFn); | ||||
if (!GC.empty()) Fn->setGC(GC); | if (!GC.empty()) Fn->setGC(GC); | ||||
Fn->setPrefixData(Prefix); | Fn->setPrefixData(Prefix); | ||||
Fn->setPrologueData(Prologue); | Fn->setPrologueData(Prologue); | ||||
ForwardRefAttrGroups[Fn] = FwdRefAttrGrps; | ForwardRefAttrGroups[Fn] = FwdRefAttrGrps; | ||||
▲ Show 20 Lines • Show All 3,941 Lines • Show Last 20 Lines |