diff options
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index bcc39ef9fba..ee77882e7ca 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -2654,23 +2654,27 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { } void visitCleanupBlockInst(CleanupBlockInst &I) { - setShadow(&I, getCleanShadow(&I)); - setOrigin(&I, getCleanOrigin()); + if (!I.getType()->isVoidTy()) { + setShadow(&I, getCleanShadow(&I)); + setOrigin(&I, getCleanOrigin()); + } } void visitCatchBlock(CatchBlockInst &I) { - setShadow(&I, getCleanShadow(&I)); - setOrigin(&I, getCleanOrigin()); + if (!I.getType()->isVoidTy()) { + setShadow(&I, getCleanShadow(&I)); + setOrigin(&I, getCleanOrigin()); + } } void visitTerminateBlock(TerminateBlockInst &I) { - setShadow(&I, getCleanShadow(&I)); - setOrigin(&I, getCleanOrigin()); + DEBUG(dbgs() << "TerminateBlock: " << I << "\n"); + // Nothing to do here. } void visitCatchEndBlockInst(CatchEndBlockInst &I) { - setShadow(&I, getCleanShadow(&I)); - setOrigin(&I, getCleanOrigin()); + DEBUG(dbgs() << "CatchEndBlock: " << I << "\n"); + // Nothing to do here. } void visitGetElementPtrInst(GetElementPtrInst &I) { |