mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
MIR Parser: Use source locations for MBB naming errors.
This commit changes the type of the field 'Name' in the struct 'yaml::MachineBasicBlock' from 'std::string' to 'yaml::StringValue'. This change allows the MIR parser to report errors related to the MBB name with the proper source locations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -83,7 +83,7 @@ namespace yaml {
|
||||
|
||||
struct MachineBasicBlock {
|
||||
unsigned ID;
|
||||
std::string Name;
|
||||
StringValue Name;
|
||||
unsigned Alignment = 0;
|
||||
bool IsLandingPad = false;
|
||||
bool AddressTaken = false;
|
||||
@ -97,7 +97,7 @@ template <> struct MappingTraits<MachineBasicBlock> {
|
||||
static void mapping(IO &YamlIO, MachineBasicBlock &MBB) {
|
||||
YamlIO.mapRequired("id", MBB.ID);
|
||||
YamlIO.mapOptional("name", MBB.Name,
|
||||
std::string()); // Don't print out an empty name.
|
||||
StringValue()); // Don't print out an empty name.
|
||||
YamlIO.mapOptional("alignment", MBB.Alignment);
|
||||
YamlIO.mapOptional("isLandingPad", MBB.IsLandingPad);
|
||||
YamlIO.mapOptional("addressTaken", MBB.AddressTaken);
|
||||
|
Reference in New Issue
Block a user