diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParserCommon.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParserCommon.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParserCommon.cpp b/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParserCommon.cpp index 10b80cad4347..6d3a59d532fd 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParserCommon.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/ARMTargetParserCommon.cpp @@ -134,13 +134,13 @@ ARM::EndianKind ARM::parseArchEndian(StringRef Arch) { } // Parse a branch protection specification, which has the form -// standard | none | [bti,pac-ret[+b-key,+leaf]*] +// standard | none | [bti,pac-ret[+b-key,+leaf,+pc]*] // Returns true on success, with individual elements of the specification // returned in `PBP`. Returns false in error, with `Err` containing // an erroneous part of the spec. bool ARM::parseBranchProtection(StringRef Spec, ParsedBranchProtection &PBP, StringRef &Err) { - PBP = {"none", "a_key", false}; + PBP = {"none", "a_key", false, false}; if (Spec == "none") return true; // defaults are ok @@ -166,6 +166,8 @@ bool ARM::parseBranchProtection(StringRef Spec, ParsedBranchProtection &PBP, PBP.Scope = "all"; else if (PACOpt == "b-key") PBP.Key = "b_key"; + else if (PACOpt == "pc") + PBP.BranchProtectionPAuthLR = true; else break; } |