Skip to content

Commit 2bf2b6b

Browse files
authored
[AVR] Only specify one legal int string in data layout (#153010)
There should not be both `n8` and `n16:8`. This is a single list of legal integers. Additionally, this should use the standard order in increasing size `n8:16`.
1 parent 69d1417 commit 2bf2b6b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clang/lib/Basic/Targets/AVR.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ class LLVM_LIBRARY_VISIBILITY AVRTargetInfo : public TargetInfo {
5757
Int16Type = SignedInt;
5858
Char32Type = UnsignedLong;
5959
SigAtomicType = SignedChar;
60-
resetDataLayout(
61-
"e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-n16:8-a:8");
60+
resetDataLayout("e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8:16-a:8");
6261
}
6362

6463
void getTargetDefines(const LangOptions &Opts,

llvm/lib/Target/AVR/AVRTargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
namespace llvm {
3030

3131
static const char *AVRDataLayout =
32-
"e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-n16:8-a:8";
32+
"e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8:16-a:8";
3333

3434
/// Processes a CPU name.
3535
static StringRef getCPU(StringRef CPU) {

0 commit comments

Comments
 (0)