summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-11-08 17:21:38 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-11-08 17:21:38 +0000
commit09f51d1fd4b54ccbb9cd454db937b056785601de (patch)
tree8452b38b34f4cab302e7513446ed6fe75b0f7303 /llvm/lib/CodeGen
parent16ac9be7f0b2a7c716adddc92b7ea5b04fe94ba5 (diff)
downloadbcm5719-llvm-09f51d1fd4b54ccbb9cd454db937b056785601de.tar.gz
bcm5719-llvm-09f51d1fd4b54ccbb9cd454db937b056785601de.zip
Factor out offset printing code into generic AsmPrinter.
FIXME: it seems, that most of targets don't support offsets wrt CPI/GlobalAddress', was it intentional? llvm-svn: 58917
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 01854415090..c75957a6778 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1520,6 +1520,13 @@ void AsmPrinter::printVisibility(const std::string& Name,
}
}
+void AsmPrinter::printOffset(int64_t Offset) const {
+ if (Offset > 0)
+ O << '+' << Offset;
+ else if (Offset < 0)
+ O << Offset;
+}
+
GCMetadataPrinter *AsmPrinter::GetOrCreateGCPrinter(GCStrategy *S) {
if (!S->usesMetadata())
return 0;
OpenPOWER on IntegriCloud