From 5e529592b17880abebd71c233b1cb848c32abeb6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 24 Aug 2017 16:35:02 +0000 Subject: Vendor import of llvm release_50 branch r311606: https://llvm.org/svn/llvm-project/llvm/branches/release_50@311606 --- lib/Object/COFFModuleDefinition.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/Object/COFFModuleDefinition.cpp') diff --git a/lib/Object/COFFModuleDefinition.cpp b/lib/Object/COFFModuleDefinition.cpp index ed9140d1fe08b..510eac8b239ba 100644 --- a/lib/Object/COFFModuleDefinition.cpp +++ b/lib/Object/COFFModuleDefinition.cpp @@ -232,7 +232,13 @@ private: for (;;) { read(); if (Tok.K == Identifier && Tok.Value[0] == '@') { - Tok.Value.drop_front().getAsInteger(10, E.Ordinal); + if (Tok.Value.drop_front().getAsInteger(10, E.Ordinal)) { + // Not an ordinal modifier at all, but the next export (fastcall + // decorated) - complete the current one. + unget(); + Info.Exports.push_back(E); + return Error::success(); + } read(); if (Tok.K == KwNoname) { E.Noname = true; -- cgit v1.2.3