#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Mangler.h"
#include "llvm/Support/MathExtras.h"
-#include <set>
using namespace llvm;
namespace {
const std::string bss_section(".bss");
class SPUAsmPrinter : public AsmPrinter {
- std::set<std::string> FnStubs, GVStubs;
public:
explicit SPUAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
const MCAsmInfo *T, bool V) :
// Computing the address of an external symbol, not calling it.
if (TM.getRelocationModel() != Reloc::Static) {
std::string Name(MAI->getGlobalPrefix()); Name += MO.getSymbolName();
- GVStubs.insert(Name);
O << "L" << Name << "$non_lazy_ptr";
return;
}
if (TM.getRelocationModel() != Reloc::Static) {
if (((GV->isDeclaration() || GV->hasWeakLinkage() ||
GV->hasLinkOnceLinkage() || GV->hasCommonLinkage()))) {
- GVStubs.insert(Name);
O << "L" << Name << "$non_lazy_ptr";
return;
}