@@ -1451,7 +1451,7 @@ static llvm::MDNode *getAsmSrcLocInfo(const StringLiteral *Str,
1451
1451
for (unsigned i = 0, e = StrVal.size()-1; i != e; ++i) {
1452
1452
if (StrVal[i] != '\n') continue;
1453
1453
SourceLocation LineLoc = Str->getLocationOfByte(i+1, SM, LangOpts,
1454
- CGF.Target );
1454
+ CGF.getTarget() );
1455
1455
Locs.push_back(llvm::ConstantInt::get(CGF.Int32Ty,
1456
1456
LineLoc.getRawEncoding()));
1457
1457
}
@@ -1471,16 +1471,17 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
1471
1471
for (unsigned i = 0, e = S.getNumOutputs(); i != e; i++) {
1472
1472
TargetInfo::ConstraintInfo Info(S.getOutputConstraint(i),
1473
1473
S.getOutputName(i));
1474
- bool IsValid = Target .validateOutputConstraint(Info); (void)IsValid;
1474
+ bool IsValid = getTarget() .validateOutputConstraint(Info); (void)IsValid;
1475
1475
assert(IsValid && "Failed to parse output constraint");
1476
1476
OutputConstraintInfos.push_back(Info);
1477
1477
}
1478
1478
1479
1479
for (unsigned i = 0, e = S.getNumInputs(); i != e; i++) {
1480
1480
TargetInfo::ConstraintInfo Info(S.getInputConstraint(i),
1481
1481
S.getInputName(i));
1482
- bool IsValid = Target.validateInputConstraint(OutputConstraintInfos.data(),
1483
- S.getNumOutputs(), Info);
1482
+ bool IsValid =
1483
+ getTarget().validateInputConstraint(OutputConstraintInfos.data(),
1484
+ S.getNumOutputs(), Info);
1484
1485
assert(IsValid && "Failed to parse input constraint"); (void)IsValid;
1485
1486
InputConstraintInfos.push_back(Info);
1486
1487
}
@@ -1504,13 +1505,14 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
1504
1505
1505
1506
// Simplify the output constraint.
1506
1507
std::string OutputConstraint(S.getOutputConstraint(i));
1507
- OutputConstraint = SimplifyConstraint(OutputConstraint.c_str() + 1, Target);
1508
+ OutputConstraint = SimplifyConstraint(OutputConstraint.c_str() + 1,
1509
+ getTarget());
1508
1510
1509
1511
const Expr *OutExpr = S.getOutputExpr(i);
1510
1512
OutExpr = OutExpr->IgnoreParenNoopCasts(getContext());
1511
1513
1512
1514
OutputConstraint = AddVariableConstraints(OutputConstraint, *OutExpr,
1513
- Target , CGM, S);
1515
+ getTarget() , CGM, S);
1514
1516
1515
1517
LValue Dest = EmitLValue(OutExpr);
1516
1518
if (!Constraints.empty())
@@ -1591,13 +1593,13 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
1591
1593
1592
1594
// Simplify the input constraint.
1593
1595
std::string InputConstraint(S.getInputConstraint(i));
1594
- InputConstraint = SimplifyConstraint(InputConstraint.c_str(), Target ,
1596
+ InputConstraint = SimplifyConstraint(InputConstraint.c_str(), getTarget() ,
1595
1597
&OutputConstraintInfos);
1596
1598
1597
1599
InputConstraint =
1598
1600
AddVariableConstraints(InputConstraint,
1599
1601
*InputExpr->IgnoreParenNoopCasts(getContext()),
1600
- Target , CGM, S);
1602
+ getTarget() , CGM, S);
1601
1603
1602
1604
llvm::Value *Arg = EmitAsmInput(Info, InputExpr, Constraints);
1603
1605
@@ -1649,7 +1651,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
1649
1651
StringRef Clobber = S.getClobber(i);
1650
1652
1651
1653
if (Clobber != "memory" && Clobber != "cc")
1652
- Clobber = Target .getNormalizedGCCRegisterName(Clobber);
1654
+ Clobber = getTarget() .getNormalizedGCCRegisterName(Clobber);
1653
1655
1654
1656
if (i != 0 || NumConstraints != 0)
1655
1657
Constraints += ',';
@@ -1660,7 +1662,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
1660
1662
}
1661
1663
1662
1664
// Add machine specific clobbers
1663
- std::string MachineClobbers = Target .getClobbers();
1665
+ std::string MachineClobbers = getTarget() .getClobbers();
1664
1666
if (!MachineClobbers.empty()) {
1665
1667
if (!Constraints.empty())
1666
1668
Constraints += ',';
0 commit comments