1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Print a comment next to "materializable" global values, to distinguish

them from values that are not actually defined in the module.

llvm-svn: 94854
This commit is contained in:
Dan Gohman 2010-01-29 23:12:36 +00:00
parent 5964860340
commit c5a2b73589

View File

@ -1418,6 +1418,9 @@ static void PrintVisibility(GlobalValue::VisibilityTypes Vis,
}
void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
if (GV->isMaterializable())
Out << "; Materializable\n";
WriteAsOperandInternal(Out, GV, &TypePrinter, &Machine);
Out << " = ";
@ -1448,6 +1451,9 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
}
void AssemblyWriter::printAlias(const GlobalAlias *GA) {
if (GA->isMaterializable())
Out << "; Materializable\n";
// Don't crash when dumping partially built GA
if (!GA->hasName())
Out << "<<nameless>> = ";
@ -1521,6 +1527,9 @@ void AssemblyWriter::printFunction(const Function *F) {
if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out);
if (F->isMaterializable())
Out << "; Materializable\n";
if (F->isDeclaration())
Out << "declare ";
else