mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 14:35:54 +00:00
llvm-mc: In a .fill directive, still honor .align even if invalid maximum bytes
count is given (this matches 'as'). llvm-svn: 79683
This commit is contained in:
parent
bb4c910976
commit
a64aa8d442
@ -1072,12 +1072,13 @@ bool AsmParser::ParseDirectiveAlign(bool IsPow2, unsigned ValueSize) {
|
||||
Alignment = 1LL << Alignment;
|
||||
}
|
||||
|
||||
// Diagnose non-sensical max bytes to fill.
|
||||
// Diagnose non-sensical max bytes to fill, which are treated as missing (this
|
||||
// matches 'as').
|
||||
if (MaxBytesLoc.isValid()) {
|
||||
if (MaxBytesToFill < 1) {
|
||||
Warning(MaxBytesLoc, "alignment directive can never be satisfied in this "
|
||||
"many bytes, ignoring");
|
||||
return false;
|
||||
"many bytes, ignoring maximum bytes expression");
|
||||
MaxBytesToFill = 0;
|
||||
}
|
||||
|
||||
if (MaxBytesToFill >= Alignment) {
|
||||
|
Loading…
Reference in New Issue
Block a user