aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmy Kwan <amy.kwan1@ibm.com>2023-09-07 20:12:31 -0500
committerAmy Kwan <amy.kwan1@ibm.com>2023-09-07 21:01:28 -0500
commit23f144ec1c014fb26a98cff407d2d83b50f11baf (patch)
treef103a7484f48bd8bad3eb30b661e52a6402ceae2
parent463c9f44dcd8a7a6e056cf3fd0a92ca42c8c6155 (diff)
downloadllvm-23f144ec1c014fb26a98cff407d2d83b50f11baf.zip
llvm-23f144ec1c014fb26a98cff407d2d83b50f11baf.tar.gz
llvm-23f144ec1c014fb26a98cff407d2d83b50f11baf.tar.bz2
[NFC] Add extra documentation for GetSymbolFromOperand() in PPCMCInstLower.cpp
Add a missing comment from D155600, where we note that we get the symbol from a global, due to XCOFF-specific intricacies.
-rw-r--r--llvm/lib/Target/PowerPC/PPCMCInstLower.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
index ba5465f..c9797fd 100644
--- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
+++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
@@ -32,6 +32,8 @@ using namespace llvm;
static MCSymbol *GetSymbolFromOperand(const MachineOperand &MO,
AsmPrinter &AP) {
if (MO.isGlobal()) {
+ // Get the symbol from the global, accounting for XCOFF-specific
+ // intricacies (see TargetLoweringObjectFileXCOFF::getTargetSymbol).
const GlobalValue *GV = MO.getGlobal();
return AP.getSymbol(GV);
}