aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCParser
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCParser')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp7
-rw-r--r--llvm/lib/MC/MCParser/MCTargetAsmParser.cpp7
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 77bf843..d0b6ea4 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -3404,11 +3404,10 @@ bool AsmParser::parseDirectiveAlign(bool IsPow2, uint8_t ValueSize) {
const MCSection *Section = getStreamer().getCurrentSectionOnly();
assert(Section && "must have section to emit alignment");
- if (HasFillExpr && FillExpr != 0 && Section->isVirtualSection()) {
+ if (HasFillExpr && FillExpr != 0 && Section->isBssSection()) {
ReturnVal |=
- Warning(FillExprLoc, "ignoring non-zero fill value in " +
- Section->getVirtualSectionKind() +
- " section '" + Section->getName() + "'");
+ Warning(FillExprLoc, "ignoring non-zero fill value in BSS section '" +
+ Section->getName() + "'");
FillExpr = 0;
}
diff --git a/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp b/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp
index 7f09349..d7b0546 100644
--- a/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp
+++ b/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp
@@ -8,8 +8,8 @@
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCRegister.h"
-#include "llvm/MC/MCStreamer.h"
using namespace llvm;
@@ -25,8 +25,9 @@ MCSubtargetInfo &MCTargetAsmParser::copySTI() {
STI = &STICopy;
// The returned STI will likely be modified. Create a new fragment to prevent
// mixing STI values within a fragment.
- if (getStreamer().getCurrentFragment())
- getStreamer().newFragment();
+ auto &S = getStreamer();
+ if (S.isObj() && S.getCurrentFragment())
+ static_cast<MCObjectStreamer &>(S).newFragment();
return STICopy;
}