We already output true and false in the printer, but the parser isn't able to read it.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/MIRParser/MIParser.cpp | ||
---|---|---|
1396 | 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 | ||
---|---|---|
1396 | Sure, that makes it a lot simpler. |
lib/CodeGen/MIRParser/MIParser.cpp | ||
---|---|---|
1379 | Why startswith instead of direct comparisons? Is it going to parse truee as true? |
lib/CodeGen/MIRParser/MIParser.cpp | ||
---|---|---|
1379 | 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". |
Why startswith instead of direct comparisons? Is it going to parse truee as true?