summaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp
diff options
context:
space:
mode:
authororivej <[email protected]>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp')
-rw-r--r--contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp134
1 files changed, 67 insertions, 67 deletions
diff --git a/contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp b/contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp
index 1998150160d..393861c73a4 100644
--- a/contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp
+++ b/contrib/libs/llvm12/lib/Support/RISCVAttributeParser.cpp
@@ -1,67 +1,67 @@
-//===-- RISCVAttributeParser.cpp - RISCV Attribute Parser -----------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Support/RISCVAttributeParser.h"
-#include "llvm/ADT/StringExtras.h"
-
-using namespace llvm;
-
-const RISCVAttributeParser::DisplayHandler
- RISCVAttributeParser::displayRoutines[] = {
- {
- RISCVAttrs::ARCH,
- &ELFAttributeParser::stringAttribute,
- },
- {
- RISCVAttrs::PRIV_SPEC,
- &ELFAttributeParser::integerAttribute,
- },
- {
- RISCVAttrs::PRIV_SPEC_MINOR,
- &ELFAttributeParser::integerAttribute,
- },
- {
- RISCVAttrs::PRIV_SPEC_REVISION,
- &ELFAttributeParser::integerAttribute,
- },
- {
- RISCVAttrs::STACK_ALIGN,
- &RISCVAttributeParser::stackAlign,
- },
- {
- RISCVAttrs::UNALIGNED_ACCESS,
- &RISCVAttributeParser::unalignedAccess,
- }};
-
-Error RISCVAttributeParser::unalignedAccess(unsigned tag) {
- static const char *strings[] = {"No unaligned access", "Unaligned access"};
- return parseStringAttribute("Unaligned_access", tag, makeArrayRef(strings));
-}
-
-Error RISCVAttributeParser::stackAlign(unsigned tag) {
- uint64_t value = de.getULEB128(cursor);
- std::string description =
- "Stack alignment is " + utostr(value) + std::string("-bytes");
- printAttribute(tag, value, description);
- return Error::success();
-}
-
-Error RISCVAttributeParser::handler(uint64_t tag, bool &handled) {
- handled = false;
- for (unsigned AHI = 0, AHE = array_lengthof(displayRoutines); AHI != AHE;
- ++AHI) {
- if (uint64_t(displayRoutines[AHI].attribute) == tag) {
- if (Error e = (this->*displayRoutines[AHI].routine)(tag))
- return e;
- handled = true;
- break;
- }
- }
-
- return Error::success();
-}
+//===-- RISCVAttributeParser.cpp - RISCV Attribute Parser -----------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Support/RISCVAttributeParser.h"
+#include "llvm/ADT/StringExtras.h"
+
+using namespace llvm;
+
+const RISCVAttributeParser::DisplayHandler
+ RISCVAttributeParser::displayRoutines[] = {
+ {
+ RISCVAttrs::ARCH,
+ &ELFAttributeParser::stringAttribute,
+ },
+ {
+ RISCVAttrs::PRIV_SPEC,
+ &ELFAttributeParser::integerAttribute,
+ },
+ {
+ RISCVAttrs::PRIV_SPEC_MINOR,
+ &ELFAttributeParser::integerAttribute,
+ },
+ {
+ RISCVAttrs::PRIV_SPEC_REVISION,
+ &ELFAttributeParser::integerAttribute,
+ },
+ {
+ RISCVAttrs::STACK_ALIGN,
+ &RISCVAttributeParser::stackAlign,
+ },
+ {
+ RISCVAttrs::UNALIGNED_ACCESS,
+ &RISCVAttributeParser::unalignedAccess,
+ }};
+
+Error RISCVAttributeParser::unalignedAccess(unsigned tag) {
+ static const char *strings[] = {"No unaligned access", "Unaligned access"};
+ return parseStringAttribute("Unaligned_access", tag, makeArrayRef(strings));
+}
+
+Error RISCVAttributeParser::stackAlign(unsigned tag) {
+ uint64_t value = de.getULEB128(cursor);
+ std::string description =
+ "Stack alignment is " + utostr(value) + std::string("-bytes");
+ printAttribute(tag, value, description);
+ return Error::success();
+}
+
+Error RISCVAttributeParser::handler(uint64_t tag, bool &handled) {
+ handled = false;
+ for (unsigned AHI = 0, AHE = array_lengthof(displayRoutines); AHI != AHE;
+ ++AHI) {
+ if (uint64_t(displayRoutines[AHI].attribute) == tag) {
+ if (Error e = (this->*displayRoutines[AHI].routine)(tag))
+ return e;
+ handled = true;
+ break;
+ }
+ }
+
+ return Error::success();
+}