]> granicus.if.org Git - llvm/commitdiff
Repair compilation of llvm-stress after r350835.
authorJames Y Knight <jyknight@google.com>
Thu, 10 Jan 2019 16:43:26 +0000 (16:43 +0000)
committerJames Y Knight <jyknight@google.com>
Thu, 10 Jan 2019 16:43:26 +0000 (16:43 +0000)
Apparently it doesn't get built by 'ninja check'. :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350843 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-stress/llvm-stress.cpp

index f7aff195e5d1fccec1683b7dfb13b5e14bd550c2..c29b7a7f7e461636cbe1d918af2bce7894216474 100644 (file)
@@ -356,7 +356,7 @@ struct StoreModifier: public Modifier {
   void Act() override {
     // Try to use predefined pointers. If non-exist, use undef pointer value;
     Value *Ptr = getRandomPointerValue();
-    PointerType *Tp = Ptr->getType();
+    PointerType *Tp = cast<PointerType>(Ptr->getType());
     Value *Val = getRandomValue(Tp->getElementType());
     Type  *ValTy = Val->getType();