How to fix the following error?
/llvm/lib/MC/MCParser/AsmParser.cpp:2406:7: error: invalid use of incomplete type ‘const class llvm::MCSubtargetInfo’
STI.setParentID(std::to_string(MAI.assemFuncNo) + "_" + std::to_string(MAI.assemBBLNo));
How to fix the following error?
/llvm/lib/MC/MCParser/AsmParser.cpp:2406:7: error: invalid use of incomplete type ‘const class llvm::MCSubtargetInfo’
STI.setParentID(std::to_string(MAI.assemFuncNo) + "_" + std::to_string(MAI.assemBBLNo));
Given that it complains about “incomplete type” you probably need to include the header file that fully declares the type, mostly likely MC/MCSubtargetInfo.h.