aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-mc
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
commit581ed7a565878bbec9cf31b4a52b2ca96f074246 (patch)
treefca5e74713a91af47b6d2c7052c67fed14a985bf /tools/llvm-mc
parent588fe562f3c81ec47d5a8220593d0caae3dd9ecb (diff)
downloadexternal_llvm-581ed7a565878bbec9cf31b4a52b2ca96f074246.zip
external_llvm-581ed7a565878bbec9cf31b4a52b2ca96f074246.tar.gz
external_llvm-581ed7a565878bbec9cf31b4a52b2ca96f074246.tar.bz2
llvm-mc: In a .fill directive, still honor .align even if invalid maximum bytes
count is given (this matches 'as'). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc')
-rw-r--r--tools/llvm-mc/AsmParser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp
index f67bad1..9db0ac0 100644
--- a/tools/llvm-mc/AsmParser.cpp
+++ b/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) {