mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 06:40:01 +08:00
Rewrite all Property related functions in terms of StringRef.
This was a bit tricky, especially for things like OptionValueArray and OptionValueDictionary since they do some funky string parsing. Rather than try to re-write line-by-line I tried to make the StringRef usage idiomatic, even though it meant often re-writing from scratch large blocks of code in a different way while keeping true to the original intent. The finished code is a big improvement though, and often much shorter than the original code. All tests and unit tests pass on Windows and Linux. llvm-svn: 287242
This commit is contained in:
@@ -1321,9 +1321,8 @@ void PseudoInstruction::SetOpcode(size_t opcode_size, void *opcode_data) {
|
||||
}
|
||||
}
|
||||
|
||||
void PseudoInstruction::SetDescription(const char *description) {
|
||||
if (description && strlen(description) > 0)
|
||||
m_description = description;
|
||||
void PseudoInstruction::SetDescription(llvm::StringRef description) {
|
||||
m_description = description;
|
||||
}
|
||||
|
||||
Instruction::Operand Instruction::Operand::BuildRegister(ConstString &r) {
|
||||
|
||||
Reference in New Issue
Block a user