We already output true and false in the printer, but the parser isn't able to read it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/MIRParser/MIParser.cpp | ||
---|---|---|
1389 ↗ | (On Diff #148754) | Also, parseIRConstant will produce a neat error message if the boolean literal isn't specified as i1: error: /Volumes/Data/llvm/test/CodeGen/MIR/AArch64/parse-integer-true-false.mir:9:32: constant expression type mismatch %0:_(s32) = G_CONSTANT i32 true while the current version will just silently replace the type with i1. |
lib/CodeGen/MIRParser/MIParser.cpp | ||
---|---|---|
1389 ↗ | (On Diff #148754) | Sure, that makes it a lot simpler. |
lib/CodeGen/MIRParser/MIParser.cpp | ||
---|---|---|
1379 ↗ | (On Diff #149467) | Why startswith instead of direct comparisons? Is it going to parse truee as true? |
lib/CodeGen/MIRParser/MIParser.cpp | ||
---|---|---|
1379 ↗ | (On Diff #149467) | It won't parse that because parseIRConstant will fail, but you're right I had startswith mistakenly because it was a stringref view onto the raw source since they're not tokens any more, which in the debugger looked like a longer string than just "true" or "false". |