Use variable without & cause the copy of an object
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp | ||
---|---|---|
100 | StringRef is a small class. It's common to use copy in LLVM code. I guess it may be better to use copy than reference in small size sturctures. |
llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp | ||
---|---|---|
100 | I tried to make an assemble file, seems it is better to use copy here, little struct can be transfered by regs. |
llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp | ||
---|---|---|
100 | sorry, by stack not regs. |
StringRef is a small class. It's common to use copy in LLVM code. I guess it may be better to use copy than reference in small size sturctures.