summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc/AsmParser.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-21 23:01:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-21 23:01:53 +0000
commit4abcccb965bc34961c5814227aba65a2a4a8d792 (patch)
tree08cbb2f6b1edb015ac5d067f37dab3dacea52bd0 /llvm/tools/llvm-mc/AsmParser.cpp
parente839486de9966bfc74079777a0318556afbe3cd7 (diff)
downloadbcm5719-llvm-4abcccb965bc34961c5814227aba65a2a4a8d792.tar.gz
bcm5719-llvm-4abcccb965bc34961c5814227aba65a2a4a8d792.zip
llvm-mc: In a .fill directive, still honor .align even if invalid maximum bytes
count is given (this matches 'as'). llvm-svn: 79683
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.cpp')
-rw-r--r--llvm/tools/llvm-mc/AsmParser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp
index f67bad164a2..9db0ac0351b 100644
--- a/llvm/tools/llvm-mc/AsmParser.cpp
+++ b/llvm/tools/llvm-mc/AsmParser.cpp
@@ -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) {
OpenPOWER on IntegriCloud