diff options
author | Zachary Turner <zturner@google.com> | 2016-06-16 18:00:28 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-06-16 18:00:28 +0000 |
commit | 1f6372c429ce6b85a572c213d53f0ed8d293ff38 (patch) | |
tree | a33b3e57a928e737d700244cb33760c425ccf2a6 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 41315f787374e8542faa18d423784bc6c3545790 (diff) | |
download | bcm5719-llvm-1f6372c429ce6b85a572c213d53f0ed8d293ff38.tar.gz bcm5719-llvm-1f6372c429ce6b85a572c213d53f0ed8d293ff38.zip |
[pdb] Change type visitor pattern to be dynamic.
This allows better catching of compiler errors since we can use
the override keyword to verify that methods are actually
overridden.
Also in this patch I've changed from storing a boolean Error
code everywhere to returning an llvm::Error, to propagate richer
error information up the call stack.
Reviewed By: ruiu, rnk
Differential Revision: http://reviews.llvm.org/D21410
llvm-svn: 272926
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index ff719b242c4..d798901be1c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -322,10 +322,9 @@ void CodeViewDebug::emitTypeInformation() { ScopedPrinter SP(CommentOS); SP.setPrefix(CommentPrefix); CVTD.setPrinter(&SP); - bool DumpSuccess = - CVTD.dump({Record.bytes_begin(), Record.bytes_end()}); - (void)DumpSuccess; - assert(DumpSuccess && "produced malformed type record"); + Error EC = CVTD.dump({Record.bytes_begin(), Record.bytes_end()}); + assert(!EC && "produced malformed type record"); + consumeError(std::move(EC)); // emitRawComment will insert its own tab and comment string before // the first line, so strip off our first one. It also prints its own // newline. |