From 57bf7818aa7c56711ca6b1138f5fe2b0e0d4a5f7 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 24 Jun 2011 11:03:31 +0000 Subject: [PATCH] Make the generated InitXXXMCRegisterInfo function "static inline", so it doesn't get emitted into multiple object files. This caused linker errors when linking both libLLVMX86Desc and libLLVMX86CodeGen into a single binary (for example when building a monolithic libLLVM shared library). llvm-svn: 133791 --- utils/TableGen/RegisterInfoEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index 997f1c0b739..5b25f82a570 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -709,7 +709,7 @@ void RegisterInfoEmitter::runDesc(raw_ostream &OS) { OS << "}\n\n"; // End of anonymous namespace... // MCRegisterInfo initialization routine. - OS << "void " << "Init" << TargetName + OS << "static inline void Init" << TargetName << "MCRegisterInfo(MCRegisterInfo *RI) {\n"; OS << " RI->InitMCRegisterInfo(" << TargetName << "RegDesc, " << Regs.size()+1 << ");\n}\n\n";