diff options
| author | Martin Storsjo <martin@martin.st> | 2018-08-01 06:50:18 +0000 |
|---|---|---|
| committer | Martin Storsjo <martin@martin.st> | 2018-08-01 06:50:18 +0000 |
| commit | d4590c38ab960bdd7f0fed52a67a6263373a45a8 (patch) | |
| tree | 5efd647e50014b7ae10b783f2c355538c02a2543 /llvm/lib | |
| parent | 65a13888816adb5094b06e1688ca93f3d18b7ece (diff) | |
| download | bcm5719-llvm-d4590c38ab960bdd7f0fed52a67a6263373a45a8.tar.gz bcm5719-llvm-d4590c38ab960bdd7f0fed52a67a6263373a45a8.zip | |
[AArch64] Disallow the MachO specific .loh directive for windows
Also add a test for it being unsupported for linux.
Differential Revision: https://reviews.llvm.org/D49929
llvm-svn: 338493
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp index ee9443b3f71..30a9a08f234 100644 --- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -4859,7 +4859,6 @@ bool AArch64AsmParser::ParseDirective(AsmToken DirectiveID) { const MCObjectFileInfo::Environment Format = getContext().getObjectFileInfo()->getObjectFileType(); bool IsMachO = Format == MCObjectFileInfo::IsMachO; - bool IsCOFF = Format == MCObjectFileInfo::IsCOFF; StringRef IDVal = DirectiveID.getIdentifier(); SMLoc Loc = DirectiveID.getLoc(); @@ -4875,11 +4874,12 @@ bool AArch64AsmParser::ParseDirective(AsmToken DirectiveID) { parseDirectiveUnreq(Loc); else if (IDVal == ".inst") parseDirectiveInst(Loc); - else if (!IsMachO && !IsCOFF) - return true; - else if (IDVal == MCLOHDirectiveName()) - parseDirectiveLOH(IDVal, Loc); - else + else if (IsMachO) { + if (IDVal == MCLOHDirectiveName()) + parseDirectiveLOH(IDVal, Loc); + else + return true; + } else return true; return false; } |

