aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorMichael Liao <michael.hliao@gmail.com>2023-02-17 15:58:23 -0500
committerMichael Liao <michael.hliao@gmail.com>2023-02-23 21:54:50 -0500
commitfe6ca546825304e49a73eaa2c4ced57e1a8d6a5b (patch)
tree81098f6ce637353c0905ac9fbd81952848409c91 /llvm/lib/IR/DataLayout.cpp
parent17a2434bd66e7fab1a587236f7ed402c2f258b3d (diff)
downloadllvm-fe6ca546825304e49a73eaa2c4ced57e1a8d6a5b.zip
llvm-fe6ca546825304e49a73eaa2c4ced57e1a8d6a5b.tar.gz
llvm-fe6ca546825304e49a73eaa2c4ced57e1a8d6a5b.tar.bz2
[LangRef] Correct value ranges for address space, vector, and float bit sizes.
- The current implementation checks them for 24-bit inegers but the document says 23-bit one effectively by listing the range as [1,2^23). - Minor error message correction. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D144685
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index ae248e9..444630d 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -305,7 +305,7 @@ Error DataLayout::parseSpecifier(StringRef Desc) {
if (Error Err = getInt(Tok, AddrSpace))
return Err;
if (!isUInt<24>(AddrSpace))
- return reportError("Invalid address space, must be a 24bit integer");
+ return reportError("Invalid address space, must be a 24-bit integer");
// Size.
if (Rest.empty())
@@ -571,7 +571,7 @@ Error DataLayout::setAlignment(AlignTypeEnum AlignType, Align ABIAlign,
// an assert. See D67400 for context.
assert(Log2(ABIAlign) < 16 && Log2(PrefAlign) < 16 && "Alignment too big");
if (!isUInt<24>(BitWidth))
- return reportError("Invalid bit width, must be a 24bit integer");
+ return reportError("Invalid bit width, must be a 24-bit integer");
if (PrefAlign < ABIAlign)
return reportError(
"Preferred alignment cannot be less than the ABI alignment");