diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp b/contrib/llvm-project/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp index aa9d8b54d963..a364992fab3e 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp @@ -13,6 +13,18 @@ using namespace llvm; void ARMFunctionInfo::anchor() {} +yaml::ARMFunctionInfo::ARMFunctionInfo(const llvm::ARMFunctionInfo &MFI) + : LRSpilled(MFI.isLRSpilled()) {} + +void yaml::ARMFunctionInfo::mappingImpl(yaml::IO &YamlIO) { + MappingTraits<ARMFunctionInfo>::mapping(YamlIO, *this); +} + +void ARMFunctionInfo::initializeBaseYamlFields( + const yaml::ARMFunctionInfo &YamlMFI) { + LRSpilled = YamlMFI.LRSpilled; +} + static bool GetBranchTargetEnforcement(const Function &F, const ARMSubtarget *Subtarget) { if (!Subtarget->isMClass() || !Subtarget->hasV7Ops()) @@ -27,9 +39,8 @@ static bool GetBranchTargetEnforcement(const Function &F, const StringRef BTIEnable = F.getFnAttribute("branch-target-enforcement").getValueAsString(); - assert(BTIEnable.equals_insensitive("true") || - BTIEnable.equals_insensitive("false")); - return BTIEnable.equals_insensitive("true"); + assert(BTIEnable == "true" || BTIEnable == "false"); + return BTIEnable == "true"; } // The pair returns values for the ARMFunctionInfo members |
