mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[NFC] Remove some dead code:
DbgInfoIntrinsic::StripCast() is dead since r79977 The only function that creates Comdat objects seems to be in Module, and always creates them using the default constructor. llvm-svn: 269204
This commit is contained in:
parent
7445a2e54f
commit
73a19911a5
@ -46,7 +46,6 @@ public:
|
||||
private:
|
||||
friend class Module;
|
||||
Comdat();
|
||||
Comdat(SelectionKind SK, StringMapEntry<Comdat> *Name);
|
||||
Comdat(const Comdat &) = delete;
|
||||
|
||||
// Points to the map in Module.
|
||||
|
@ -75,8 +75,6 @@ namespace llvm {
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
|
||||
}
|
||||
|
||||
static Value *StripCast(Value *C);
|
||||
};
|
||||
|
||||
/// This represents the llvm.dbg.declare instruction.
|
||||
|
@ -15,9 +15,6 @@
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
using namespace llvm;
|
||||
|
||||
Comdat::Comdat(SelectionKind SK, StringMapEntry<Comdat> *Name)
|
||||
: Name(Name), SK(SK) {}
|
||||
|
||||
Comdat::Comdat(Comdat &&C) : Name(C.Name), SK(C.SK) {}
|
||||
|
||||
Comdat::Comdat() : Name(nullptr), SK(Comdat::Any) {}
|
||||
|
@ -32,24 +32,6 @@ using namespace llvm;
|
||||
/// DbgInfoIntrinsic - This is the common base class for debug info intrinsics
|
||||
///
|
||||
|
||||
static Value *CastOperand(Value *C) {
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
|
||||
if (CE->isCast())
|
||||
return CE->getOperand(0);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Value *DbgInfoIntrinsic::StripCast(Value *C) {
|
||||
if (Value *CO = CastOperand(C)) {
|
||||
C = StripCast(CO);
|
||||
} else if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) {
|
||||
if (GV->hasInitializer())
|
||||
if (Value *CO = CastOperand(GV->getInitializer()))
|
||||
C = StripCast(CO);
|
||||
}
|
||||
return dyn_cast<GlobalVariable>(C);
|
||||
}
|
||||
|
||||
Value *DbgInfoIntrinsic::getVariableLocation(bool AllowNullOp) const {
|
||||
Value *Op = getArgOperand(0);
|
||||
if (AllowNullOp && !Op)
|
||||
|
Loading…
x
Reference in New Issue
Block a user