[PATCH] D72479: [PowerPC][AIX] Make PIC the default relocation model for AIX
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 17:42:16 PST 2020
hubert.reinterpretcast added a comment.
@stevewan, can you confirm if there are other tools/utilities that need similar treatment?
================
Comment at: llvm/tools/llc/llc.cpp:399
std::string CPUStr = getCPUStr(), FeaturesStr = getFeaturesStr();
+ Optional<Reloc::Model> RM = getRelocModel();
----------------
I suggest moving this to immediately before the use.
================
Comment at: llvm/tools/llc/llc.cpp:465
+ // On AIX, setting the relocation model to anything other than PIC will result
+ // in an user error.
----------------
s/will result in an user error/is considered a user error/;
================
Comment at: llvm/unittests/Target/PowerPC/AIXRelocModelTest.cpp:27
+ TargetOptions Options;
+ // Create a TargetMachine for powerpc-aix target, and deliberately leave its
+ // relocation model unset.
----------------
`powerpc--aix`.
================
Comment at: llvm/unittests/Target/PowerPC/AIXRelocModelTest.cpp:35
+
+ // The relocation model on AIX should be force to PIC regardeless.
+ EXPECT_TRUE(Target->getRelocationModel() == Reloc::PIC_);
----------------
s/force/forced/;
s/regardeless/regardless/;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72479/new/
https://reviews.llvm.org/D72479
More information about the llvm-commits
mailing list