diff options
| author | Johannes Doerfert <jdoerfert@anl.gov> | 2019-08-29 01:28:30 +0000 |
|---|---|---|
| committer | Johannes Doerfert <jdoerfert@anl.gov> | 2019-08-29 01:28:30 +0000 |
| commit | a283125ef2b24d3c07d70b83866eea63362dca9c (patch) | |
| tree | f7c483fb31af8083b55d334831c196e954084098 | |
| parent | 62a9c1da787e821e8bda02d23df7bad84577dd99 (diff) | |
| download | bcm5719-llvm-a283125ef2b24d3c07d70b83866eea63362dca9c.tar.gz bcm5719-llvm-a283125ef2b24d3c07d70b83866eea63362dca9c.zip | |
[Attributor][NFC] Add const to map key
llvm-svn: 370284
| -rw-r--r-- | llvm/include/llvm/Transforms/IPO/Attributor.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h index 4b5d266d4d8..d65ee9cb032 100644 --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -643,8 +643,7 @@ struct Attributor { /// `getAAFor` to explicitly record true dependences through this method. void recordDependence(const AbstractAttribute &FromAA, const AbstractAttribute &ToAA) { - QueryMap[const_cast<AbstractAttribute *>(&FromAA)].insert( - const_cast<AbstractAttribute *>(&ToAA)); + QueryMap[&FromAA].insert(const_cast<AbstractAttribute *>(&ToAA)); } /// Introduce a new abstract attribute into the fixpoint analysis. @@ -776,7 +775,7 @@ private: /// to the getAAFor<...>(...) method. ///{ using QueryMapTy = - MapVector<AbstractAttribute *, SetVector<AbstractAttribute *>>; + MapVector<const AbstractAttribute *, SetVector<AbstractAttribute *>>; QueryMapTy QueryMap; ///} |

