summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-06 05:51:46 +0000
committerChris Lattner <sabre@nondot.org>2005-05-06 05:51:46 +0000
commit0603845a4964e0ea7a4ac9af904d706a984341bc (patch)
treed1cd93561e1bbcaa7037cc5a2e8abd788d8ed537 /llvm/lib/VMCore/AsmWriter.cpp
parente23c13983655baaf9074cc50bda6f2fc048abd73 (diff)
downloadbcm5719-llvm-0603845a4964e0ea7a4ac9af904d706a984341bc.tar.gz
bcm5719-llvm-0603845a4964e0ea7a4ac9af904d706a984341bc.zip
Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman. llvm-svn: 21722
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 18d045f4887..6db1a9a26c1 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -1043,10 +1043,14 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
if (I.hasName())
Out << getLLVMName(I.getName()) << " = ";
- // If this is a volatile load or store, print out the volatile marker
+ // If this is a volatile load or store, print out the volatile marker.
if ((isa<LoadInst>(I) && cast<LoadInst>(I).isVolatile()) ||
- (isa<StoreInst>(I) && cast<StoreInst>(I).isVolatile()))
+ (isa<StoreInst>(I) && cast<StoreInst>(I).isVolatile())) {
Out << "volatile ";
+ } else if (isa<CallInst>(I) && cast<CallInst>(I).isTailCall()) {
+ // If this is a call, check if it's a tail call.
+ Out << "tail ";
+ }
// Print out the opcode...
Out << I.getOpcodeName();
OpenPOWER on IntegriCloud