Skip to content

Commit

Permalink
[Sparc] Use target name instead of namespace as prefix for MCRegister…
Browse files Browse the repository at this point in the history
…Classes 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
  • Loading branch information
jacobbaungard committed Nov 21, 2016
1 parent 7d7ff80 commit 3bc6fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/RegisterInfoEmitter.cpp
Expand Up @@ -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())
Expand Down

0 comments on commit 3bc6fe7

Please sign in to comment.