diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:14:58 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:14:58 +0000 |
| commit | 09e03f38d664ed09b6add37050c2df6cf1116272 (patch) | |
| tree | d039abc6012ba4fc9b945c6b1d995d024253a6b7 /llvm/lib/IR | |
| parent | 87754764199bf7547b5336b35e9a704143c177b7 (diff) | |
| download | bcm5719-llvm-09e03f38d664ed09b6add37050c2df6cf1116272.tar.gz bcm5719-llvm-09e03f38d664ed09b6add37050c2df6cf1116272.zip | |
AsmWriter/Bitcode: MDBasicType
llvm-svn: 229005
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index b728b22df99..f7ed216f79a 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -1366,10 +1366,22 @@ static void writeMDEnumerator(raw_ostream &Out, const MDEnumerator *N, Out << ")"; } -static void writeMDBasicType(raw_ostream &, const MDBasicType *, TypePrinting *, - SlotTracker *, const Module *) { - llvm_unreachable("write not implemented"); +static void writeMDBasicType(raw_ostream &Out, const MDBasicType *N, + TypePrinting *, SlotTracker *, const Module *) { + Out << "!MDBasicType("; + FieldSeparator FS; + writeTag(Out, FS, N); + if (!N->getName().empty()) + Out << FS << "name: \"" << N->getName() << "\""; + if (N->getSizeInBits()) + Out << FS << "size: " << N->getSizeInBits(); + if (N->getAlignInBits()) + Out << FS << "align: " << N->getAlignInBits(); + if (N->getEncoding()) + Out << FS << "encoding: " << N->getEncoding(); + Out << ")"; } + static void writeMDDerivedType(raw_ostream &, const MDDerivedType *, TypePrinting *, SlotTracker *, const Module *) { llvm_unreachable("write not implemented"); |

