Skip to content

Commit 6f5598b

Browse files
committed
Get the TargetTriple directly from the TargetMachine
1 parent 01673ae commit 6f5598b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
662662

663663
setBooleanContents(ZeroOrOneBooleanContent);
664664

665-
if (Subtarget.getTargetTriple().isOSGlibc()) {
665+
if (getTargetMachine().getTargetTriple().isOSGlibc()) {
666666
// Custom lowering of llvm.clear_cache.
667667
setOperationAction(ISD::CLEAR_CACHE, MVT::Other, Custom);
668668
}
@@ -7158,7 +7158,7 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
71587158
case ISD::EXPERIMENTAL_VP_REVERSE:
71597159
return lowerVPReverseExperimental(Op, DAG);
71607160
case ISD::CLEAR_CACHE: {
7161-
assert(Subtarget.getTargetTriple().isOSGlibc() &&
7161+
assert(getTargetMachine().getTargetTriple().isOSGlibc() &&
71627162
"llvm.clear_cache only needs custom lower on glibc targets");
71637163
SDLoc DL(Op);
71647164
SDValue Flags = DAG.getConstant(0, DL, Subtarget.getXLenVT());

0 commit comments

Comments
 (0)