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 | a5d70d8749bd7132d4b2f805f4ca85bafd6edb07 (patch) | |
tree | ff8e96ee24e42beacfbfb55dcf6001df5aa6875e /tools/llvm-mca | |
parent | 629c9d30eb373f5ff43bceef09049621cfb91b89 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mca')
-rw-r--r-- | tools/llvm-mca/llvm-mca.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-mca/llvm-mca.cpp b/tools/llvm-mca/llvm-mca.cpp index a492eb8cc00..4cdd6baba5e 100644 --- a/tools/llvm-mca/llvm-mca.cpp +++ b/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 {} |