From 3bc6fe78f62fb5e43feeba25e32fbaedfc647ef8 Mon Sep 17 00:00:00 2001 From: Jacob Baungard Hansen Date: Mon, 21 Nov 2016 09:33:05 +0000 Subject: [PATCH] [Sparc] Use target name instead of namespace as prefix for MCRegisterClasses array Summary: For Sparc the namespace (SP) is different from the target name (Sparc), which causes the name of the array in this declaration to differ from the name used in the definition. Patch by Daniel Cederman. Reviewers: jyknight Subscribers: llvm-commits, jyknight Differential Revision: https://reviews.llvm.org/D23650 llvm-svn: 287528 --- llvm/utils/TableGen/RegisterInfoEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/RegisterInfoEmitter.cpp b/llvm/utils/TableGen/RegisterInfoEmitter.cpp index 72a8cb5420e0d..83b2bf8a52288 100644 --- a/llvm/utils/TableGen/RegisterInfoEmitter.cpp +++ b/llvm/utils/TableGen/RegisterInfoEmitter.cpp @@ -104,7 +104,7 @@ void RegisterInfoEmitter::runEnums(raw_ostream &OS, OS << "namespace llvm {\n\n"; OS << "class MCRegisterClass;\n" - << "extern const MCRegisterClass " << Namespace + << "extern const MCRegisterClass " << Target.getName() << "MCRegisterClasses[];\n\n"; if (!Namespace.empty())