Details
Details
- Reviewers
kzhuravl arsenm rampitec - Commits
- rGa24ff176a688: [AMDGPU][NFC] Fixing formatting
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Just move it
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | ||
---|---|---|
1132 | Just move the const to the right place? |
Comment Actions
While you are here, please drop the space between asterisk and Sym. I.e. 'const MCSymbol *Sym'.
Comment Actions
@rampitec @arsenm If I'm understanding correctly, moving const to the left of "MCSymbol *"' declares the object as const instead of the pointer. In this case, we get a compilation error on the following line:
llvm-project/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:1133:9: error: 'this' argument to member function 'setVariableValue' has type 'const llvm::MCSymbol', but function is not marked const Sym->setVariableValue(MCConstantExpr::create(SgprIndexUnusedMin, *Ctx));
This error seems reasonable, as we're changing a member of Sym (Value). So in this case would we actually just want "MCSymbol *Sym" or "MCSymbol* const Sym"?
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | ||
---|---|---|
1132 | 80 symbols per line. |
Comment Actions
Reverting code changes but keeping updated formatting to fix build error (see previous comment)
clang-format not found in user’s local PATH; not linting file.