Index: lib/Target/Mips/AsmParser/MipsAsmParser.cpp =================================================================== --- lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -10,6 +10,7 @@ #include "MCTargetDesc/MipsMCExpr.h" #include "MCTargetDesc/MipsMCTargetDesc.h" #include "MipsRegisterInfo.h" +#include "MipsTargetObjectFile.h" #include "MipsTargetStreamer.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/StringSwitch.h" @@ -381,6 +382,11 @@ bool inMips16Mode() const { return STI.getFeatureBits() & Mips::FeatureMips16; } + + bool inPicMode() { + return getContext().getObjectFileInfo()->getRelocM() == Reloc::PIC_; + } + // TODO: see how can we get this info. bool abiUsesSoftFloat() const { return false; }