summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCWasmStreamer.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-07-02 17:29:43 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-07-02 17:29:43 +0000
commit4d5b1073ba87f6709112d0d9b5270ee51d3abd54 (patch)
tree7092adab58fd58dc72a6580d86337d58dd13a92f /llvm/lib/MC/MCWasmStreamer.cpp
parentd4f77a523bb99d3ac7132dfb5783b85835312cce (diff)
downloadbcm5719-llvm-4d5b1073ba87f6709112d0d9b5270ee51d3abd54.tar.gz
bcm5719-llvm-4d5b1073ba87f6709112d0d9b5270ee51d3abd54.zip
[MC] Error on a .zerofill directive in a non-virtual section
On darwin, all virtual sections have zerofill type, and having a .zerofill directive in a non-virtual section is not allowed. Instead of asserting, show a nicer error. In order to use the equivalent of .zerofill in a non-virtual section, the usage of .zero of .space is required. This patch replaces the assert with an error. Differential Revision: https://reviews.llvm.org/D48517 llvm-svn: 336127
Diffstat (limited to 'llvm/lib/MC/MCWasmStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCWasmStreamer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCWasmStreamer.cpp b/llvm/lib/MC/MCWasmStreamer.cpp
index c950ac778ea..0e593221404 100644
--- a/llvm/lib/MC/MCWasmStreamer.cpp
+++ b/llvm/lib/MC/MCWasmStreamer.cpp
@@ -215,7 +215,8 @@ void MCWasmStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {
}
void MCWasmStreamer::EmitZerofill(MCSection *Section, MCSymbol *Symbol,
- uint64_t Size, unsigned ByteAlignment) {
+ uint64_t Size, unsigned ByteAlignment,
+ SMLoc Loc) {
llvm_unreachable("Wasm doesn't support this directive");
}
OpenPOWER on IntegriCloud