[llvm] c0f9d7b - [MCParser] Modernize CppHashInfoTy (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 10 14:10:20 PDT 2023


Thank you for reporting the problem.  I just reverted:

https://github.com/llvm/llvm-project/commit/88ba56c5b834506fe1f7145ef5b459a2d3edadb8

Kazu Hirata


On Sat, Jun 10, 2023 at 10:31 AM Craig Topper <craig.topper at gmail.com>
wrote:

> I'm getting an error from this with gcc
>
> llvm/lib/MC/MCParser/MasmParser.cpp: In constructor
> ‘{anonymous}::MasmParser::MasmParser(llvm::SourceMgr&, llvm::MCContext&,
> llvm::MCStreamer&, const llvm::MCAsmInfo&, tm, unsigned int)’:
> llvm/lib/MC/MCParser/MasmParser.cpp:1095:53: error: use of deleted
> function ‘constexpr {anonymous}::MasmParser::CppHashInfoTy::CppHashInfoTy()’
>        CurBuffer(CB ? CB : SM.getMainFileID()), TM(TM) {
> llvm/lib/MC/MCParser/MasmParser.cpp:441:5: note: ‘constexpr
> {anonymous}::MasmParser::CppHashInfoTy::CppHashInfoTy() noexcept (false)’
> is implicitly deleted because its exception-specification does not match
> the implicit exception-specification ‘noexcept’
>      CppHashInfoTy() = default;
>
>
> ~Craig
>
>
> On Sat, Jun 10, 2023 at 9:02 AM Kazu Hirata via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>>
>> Author: Kazu Hirata
>> Date: 2023-06-10T09:02:26-07:00
>> New Revision: c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b
>>
>> URL:
>> https://github.com/llvm/llvm-project/commit/c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b
>> DIFF:
>> https://github.com/llvm/llvm-project/commit/c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b.diff
>>
>> LOG: [MCParser] Modernize CppHashInfoTy (NFC)
>>
>> Added:
>>
>>
>> Modified:
>>     llvm/lib/MC/MCParser/MasmParser.cpp
>>
>> Removed:
>>
>>
>>
>>
>> ################################################################################
>> diff  --git a/llvm/lib/MC/MCParser/MasmParser.cpp
>> b/llvm/lib/MC/MCParser/MasmParser.cpp
>> index d522b77c25874..1502d70fddfb0 100644
>> --- a/llvm/lib/MC/MCParser/MasmParser.cpp
>> +++ b/llvm/lib/MC/MCParser/MasmParser.cpp
>> @@ -435,10 +435,10 @@ class MasmParser : public MCAsmParser {
>>    /// The values from the last parsed cpp hash file line comment if any.
>>    struct CppHashInfoTy {
>>      StringRef Filename;
>> -    int64_t LineNumber;
>> +    int64_t LineNumber = 0;
>>      SMLoc Loc;
>> -    unsigned Buf;
>> -    CppHashInfoTy() : LineNumber(0), Buf(0) {}
>> +    unsigned Buf = 0;
>> +    CppHashInfoTy() = default;
>>    };
>>    CppHashInfoTy CppHashInfo;
>>
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230610/8318ddcd/attachment.html>


More information about the llvm-commits mailing list