Skip to content

Commit

Permalink
[Xtensa] Correct visibility of the Xtensa backend initialize functions.
Browse files Browse the repository at this point in the history
Make backend initialize functions public and visible outside library.

Closes #31
  • Loading branch information
andreisfr committed Aug 3, 2020
1 parent 713f3bf commit 1659ba1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/Target/Xtensa/AsmParser/XtensaAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,6 @@ bool XtensaAsmParser::checkRegister(unsigned RegNo) {
}

// Force static initialization.
extern "C" void LLVMInitializeXtensaAsmParser() {
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaAsmParser() {
RegisterMCAsmParser<XtensaAsmParser> X(TheXtensaTarget);
}
2 changes: 1 addition & 1 deletion llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCTargetDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ createXtensaObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) {
return new XtensaTargetELFStreamer(S);
}

extern "C" void LLVMInitializeXtensaTargetMC() {
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaTargetMC() {
// Register the MCAsmInfo.
TargetRegistry::RegisterMCAsmInfo(TheXtensaTarget, createXtensaMCAsmInfo);

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/Xtensa/TargetInfo/XtensaTargetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using namespace llvm;
namespace llvm {
Target TheXtensaTarget;
}
extern "C" void LLVMInitializeXtensaTargetInfo() {
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaTargetInfo() {
RegisterTarget<Triple::xtensa> X(TheXtensaTarget, "xtensa", "Xtensa 32",
"XTENSA");
}
2 changes: 1 addition & 1 deletion llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,6 @@ void XtensaAsmPrinter::printMemOperand(const MachineInstr *MI, int opNum,
}

// Force static initialization.
extern "C" void LLVMInitializeXtensaAsmPrinter() {
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaAsmPrinter() {
RegisterAsmPrinter<XtensaAsmPrinter> A(TheXtensaTarget);
}
2 changes: 1 addition & 1 deletion llvm/lib/Target/Xtensa/XtensaTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

using namespace llvm;

extern "C" void LLVMInitializeXtensaTarget() {
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaTarget() {
// Register the target.
RegisterTargetMachine<XtensaTargetMachine> A(TheXtensaTarget);
}
Expand Down

0 comments on commit 1659ba1

Please sign in to comment.