diff options
author | Dan Gohman <gohman@apple.com> | 2010-01-29 23:12:36 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-01-29 23:12:36 +0000 |
commit | 4483c7b15aa343bd95e3d7f800be788b77ea23f8 (patch) | |
tree | 62cc635f333911cd292ed38f0cab4ea319ff5c11 /lib/VMCore/AsmWriter.cpp | |
parent | 6c2e8a9217ced50da49fb79c569317a50b101f90 (diff) |
Print a comment next to "materializable" global values, to distinguish
them from values that are not actually defined in the module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index e62ecdbbcb..ab5f45a2b9 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -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 |