diff options
| author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-07-02 17:29:43 +0000 |
|---|---|---|
| committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-07-02 17:29:43 +0000 |
| commit | 4d5b1073ba87f6709112d0d9b5270ee51d3abd54 (patch) | |
| tree | 7092adab58fd58dc72a6580d86337d58dd13a92f /llvm/tools | |
| parent | d4f77a523bb99d3ac7132dfb5783b85835312cce (diff) | |
| download | bcm5719-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/tools')
| -rw-r--r-- | llvm/tools/llvm-mca/llvm-mca.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index a492eb8cc00..4cdd6baba5e 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -287,7 +287,8 @@ public: void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override {} void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr, - uint64_t Size = 0, unsigned ByteAlignment = 0) override {} + uint64_t Size = 0, unsigned ByteAlignment = 0, + SMLoc Loc = SMLoc()) override {} void EmitGPRel32Value(const MCExpr *Value) override {} void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {} void EmitCOFFSymbolStorageClass(int StorageClass) override {} |

