Skip to content

[DataLayout] Extract loop body into a function to reduce nesting (NFC) #104420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions llvm/include/llvm/IR/DataLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ class DataLayout {
/// Internal helper method that returns requested alignment for type.
Align getAlignment(Type *Ty, bool abi_or_pref) const;

/// Attempts to parse a target data specification string and reports an error
/// if the string is malformed.
Error parseSpecifier(StringRef Desc);
/// Attempts to parse a single specification.
Error parseSpecification(StringRef Specification);

/// Attempts to parse a data layout string.
Error parseLayoutString(StringRef LayoutString);

public:
/// Constructs a DataLayout with default values.
Expand All @@ -188,7 +190,7 @@ class DataLayout {

/// Parse a data layout string and return the layout. Return an error
/// description on failure.
static Expected<DataLayout> parse(StringRef LayoutDescription);
static Expected<DataLayout> parse(StringRef LayoutString);

/// Layout endianness...
bool isLittleEndian() const { return !BigEndian; }
Expand Down
Loading
Loading