summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-08-29 01:28:30 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-08-29 01:28:30 +0000
commita283125ef2b24d3c07d70b83866eea63362dca9c (patch)
treef7c483fb31af8083b55d334831c196e954084098
parent62a9c1da787e821e8bda02d23df7bad84577dd99 (diff)
downloadbcm5719-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.h5
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;
///}
OpenPOWER on IntegriCloud