summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-stress
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-01-10 16:07:20 +0000
committerJames Y Knight <jyknight@google.com>2019-01-10 16:07:20 +0000
commit62df5eed16a07c4dd183c71d69d6858b5fa19652 (patch)
treee9d9c43424b364b6ed2ee4524e26e16ab34e7047 /llvm/tools/llvm-stress
parent20c7844f50a2f2c555bfc6d9b3d2376a6f154511 (diff)
downloadbcm5719-llvm-62df5eed16a07c4dd183c71d69d6858b5fa19652.tar.gz
bcm5719-llvm-62df5eed16a07c4dd183c71d69d6858b5fa19652.zip
[opaque pointer types] Remove some calls to generic Type subtype accessors.
That is, remove many of the calls to Type::getNumContainedTypes(), Type::subtypes(), and Type::getContainedType(N). I'm not intending to remove these accessors -- they are useful/necessary in some cases. However, removing the pointee type from pointers would potentially break some uses, and reducing the number of calls makes it easier to audit. llvm-svn: 350835
Diffstat (limited to 'llvm/tools/llvm-stress')
-rw-r--r--llvm/tools/llvm-stress/llvm-stress.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-stress/llvm-stress.cpp b/llvm/tools/llvm-stress/llvm-stress.cpp
index d8ec11251ff..f7aff195e5d 100644
--- a/llvm/tools/llvm-stress/llvm-stress.cpp
+++ b/llvm/tools/llvm-stress/llvm-stress.cpp
@@ -356,8 +356,8 @@ struct StoreModifier: public Modifier {
void Act() override {
// Try to use predefined pointers. If non-exist, use undef pointer value;
Value *Ptr = getRandomPointerValue();
- Type *Tp = Ptr->getType();
- Value *Val = getRandomValue(Tp->getContainedType(0));
+ PointerType *Tp = Ptr->getType();
+ Value *Val = getRandomValue(Tp->getElementType());
Type *ValTy = Val->getType();
// Do not store vectors of i1s because they are unsupported
OpenPOWER on IntegriCloud