Skip to content

Commit 6344b6a

Browse files
committed
[mfc] Fix RTTI for InstrProf intrinsics
1 parent 1a2960b commit 6344b6a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

llvm/include/llvm/IR/IntrinsicInst.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,8 +1428,15 @@ class VACopyInst : public IntrinsicInst {
14281428
};
14291429

14301430
/// A base class for all instrprof intrinsics.
1431+
class InstrProfInstBase;
1432+
class InstrProfMCDCBitmapInstBase;
1433+
class InstrProfMCDCCondBitmapUpdate;
14311434
class InstrProfInstBase : public IntrinsicInst {
14321435
public:
1436+
static bool classof(const Value *V) {
1437+
return isa<InstrProfInstBase>(V) || isa<InstrProfMCDCBitmapInstBase>(V) ||
1438+
isa<InstrProfMCDCCondBitmapUpdate>(V);
1439+
}
14331440
// The name of the instrumented function.
14341441
GlobalVariable *getName() const {
14351442
return cast<GlobalVariable>(
@@ -1442,8 +1449,17 @@ class InstrProfInstBase : public IntrinsicInst {
14421449
};
14431450

14441451
/// A base class for all instrprof counter intrinsics.
1452+
class InstProfCoverInst;
1453+
class InstProfIncrementInst;
1454+
class InstrProfTimestampInst;
1455+
class InstrProfValueProfileInst;
14451456
class InstrProfCntrInstBase : public InstrProfInstBase {
14461457
public:
1458+
static bool classof(const Value *V){
1459+
return isa<InstProfCoverInst>(V) || isa<InstProfIncrementInst>(V) ||
1460+
isa<InstrProfTimestampInst>(V) || isa<InstrProfValueProfileInst>(V);
1461+
}
1462+
14471463
// The number of counters for the instrumented function.
14481464
ConstantInt *getNumCounters() const;
14491465
// The index of the counter that this instruction acts on.

0 commit comments

Comments
 (0)