File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3047,7 +3047,7 @@ void PPCAIXAsmPrinter::emitEndOfAsmFile(Module &M) {
3047
3047
bool PPCAIXAsmPrinter::doInitialization (Module &M) {
3048
3048
const bool Result = PPCAsmPrinter::doInitialization (M);
3049
3049
3050
- // Emit .machine directive on AIX.
3050
+ // Emit the .machine directive on AIX.
3051
3051
const Triple &Target = TM.getTargetTriple ();
3052
3052
XCOFF::CFileCpuId TargetCpuId = XCOFF::TCPU_INVALID;
3053
3053
// Walk through the "target-cpu" attribute of functions and use the newest
@@ -3061,10 +3061,12 @@ bool PPCAIXAsmPrinter::doInitialization(Module &M) {
3061
3061
// If there is no "target-cpu" attribute within the functions, take the
3062
3062
// "-mcpu" value. If both are omitted, use getNormalizedPPCTargetCPU() to
3063
3063
// determine the default CPU.
3064
- if (!TargetCpuId)
3065
- TargetCpuId = XCOFF::getCpuID (TM.getTargetCPU ().empty ()
3066
- ? PPC::getNormalizedPPCTargetCPU (Target)
3067
- : TM.getTargetCPU ());
3064
+ if (!TargetCpuId) {
3065
+ StringRef TargetCPU = TM.getTargetCPU ();
3066
+ TargetCpuId = XCOFF::getCpuID (
3067
+ TargetCPU.empty () ? PPC::getNormalizedPPCTargetCPU (Target) : TargetCPU);
3068
+ }
3069
+
3068
3070
PPCTargetStreamer *TS =
3069
3071
static_cast <PPCTargetStreamer *>(OutStreamer->getTargetStreamer ());
3070
3072
TS->emitMachine (XCOFF::getTCPUString (TargetCpuId));
You can’t perform that action at this time.
0 commit comments