Fix lint warnings in MemorySanitizer.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evgeniy Stepanov
2012-12-14 13:48:31 +00:00
parent 9f1f63ecc2
commit 79c3742620

View File

@ -242,8 +242,8 @@ void MemorySanitizer::initializeCallbacks(Module &M) {
MsanPoisonStackFn = M.getOrInsertFunction( MsanPoisonStackFn = M.getOrInsertFunction(
"__msan_poison_stack", IRB.getVoidTy(), IRB.getInt8PtrTy(), IntptrTy, NULL); "__msan_poison_stack", IRB.getVoidTy(), IRB.getInt8PtrTy(), IntptrTy, NULL);
MemmoveFn = M.getOrInsertFunction( MemmoveFn = M.getOrInsertFunction(
"__msan_memmove", IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), "__msan_memmove", IRB.getInt8PtrTy(), IRB.getInt8PtrTy(),
IntptrTy, NULL); IRB.getInt8PtrTy(), IntptrTy, NULL);
MemcpyFn = M.getOrInsertFunction( MemcpyFn = M.getOrInsertFunction(
"__msan_memcpy", IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), "__msan_memcpy", IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), IRB.getInt8PtrTy(),
IntptrTy, NULL); IntptrTy, NULL);
@ -410,7 +410,8 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
Value *Shadow = getShadow(Val); Value *Shadow = getShadow(Val);
Value *ShadowPtr = getShadowPtr(Addr, Shadow->getType(), IRB); Value *ShadowPtr = getShadowPtr(Addr, Shadow->getType(), IRB);
StoreInst *NewSI = IRB.CreateAlignedStore(Shadow, ShadowPtr, I.getAlignment()); StoreInst *NewSI =
IRB.CreateAlignedStore(Shadow, ShadowPtr, I.getAlignment());
DEBUG(dbgs() << " STORE: " << *NewSI << "\n"); DEBUG(dbgs() << " STORE: " << *NewSI << "\n");
(void)NewSI; (void)NewSI;
// If the store is volatile, add a check. // If the store is volatile, add a check.
@ -940,6 +941,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
Value *Origin; Value *Origin;
IRBuilder<> &IRB; IRBuilder<> &IRB;
MemorySanitizerVisitor *MSV; MemorySanitizerVisitor *MSV;
public: public:
Combiner(MemorySanitizerVisitor *MSV, IRBuilder<> &IRB) : Combiner(MemorySanitizerVisitor *MSV, IRBuilder<> &IRB) :
Shadow(0), Origin(0), IRB(IRB), MSV(MSV) {} Shadow(0), Origin(0), IRB(IRB), MSV(MSV) {}
@ -1221,7 +1223,8 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
void visitIntrinsicInst(IntrinsicInst &I) { void visitIntrinsicInst(IntrinsicInst &I) {
switch (I.getIntrinsicID()) { switch (I.getIntrinsicID()) {
case llvm::Intrinsic::bswap: case llvm::Intrinsic::bswap:
handleBswap(I); break; handleBswap(I);
break;
default: default:
visitInstruction(I); break; visitInstruction(I); break;
} }