mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[Metadata] Decorate methods with 'const'. NFC.
- Minor coding style fix.
This commit is contained in:
parent
011e4165ea
commit
bee0b38da8
@ -677,17 +677,17 @@ struct AAMDNodes {
|
||||
MDNode *NoAlias = nullptr;
|
||||
|
||||
// Shift tbaa Metadata node to start off bytes later
|
||||
static MDNode *ShiftTBAA(MDNode *M, size_t off);
|
||||
static MDNode *shiftTBAA(MDNode *M, size_t off);
|
||||
|
||||
// Shift tbaa.struct Metadata node to start off bytes later
|
||||
static MDNode *ShiftTBAAStruct(MDNode *M, size_t off);
|
||||
static MDNode *shiftTBAAStruct(MDNode *M, size_t off);
|
||||
|
||||
/// Given two sets of AAMDNodes that apply to the same pointer,
|
||||
/// give the best AAMDNodes that are compatible with both (i.e. a set of
|
||||
/// nodes whose allowable aliasing conclusions are a subset of those
|
||||
/// allowable by both of the inputs). However, for efficiency
|
||||
/// reasons, do not create any new MDNodes.
|
||||
AAMDNodes intersect(const AAMDNodes &Other) {
|
||||
AAMDNodes intersect(const AAMDNodes &Other) const {
|
||||
AAMDNodes Result;
|
||||
Result.TBAA = Other.TBAA == TBAA ? TBAA : nullptr;
|
||||
Result.TBAAStruct = Other.TBAAStruct == TBAAStruct ? TBAAStruct : nullptr;
|
||||
@ -697,12 +697,12 @@ struct AAMDNodes {
|
||||
}
|
||||
|
||||
/// Create a new AAMDNode that describes this AAMDNode after applying a
|
||||
/// constant offset to the start of the pointer
|
||||
AAMDNodes shift(size_t Offset) {
|
||||
/// constant offset to the start of the pointer.
|
||||
AAMDNodes shift(size_t Offset) const {
|
||||
AAMDNodes Result;
|
||||
Result.TBAA = TBAA ? ShiftTBAA(TBAA, Offset) : nullptr;
|
||||
Result.TBAA = TBAA ? shiftTBAA(TBAA, Offset) : nullptr;
|
||||
Result.TBAAStruct =
|
||||
TBAAStruct ? ShiftTBAAStruct(TBAAStruct, Offset) : nullptr;
|
||||
TBAAStruct ? shiftTBAAStruct(TBAAStruct, Offset) : nullptr;
|
||||
Result.Scope = Scope;
|
||||
Result.NoAlias = NoAlias;
|
||||
return Result;
|
||||
|
@ -738,7 +738,7 @@ void TypeBasedAAWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
}
|
||||
|
||||
MDNode *AAMDNodes::ShiftTBAA(MDNode *MD, size_t Offset) {
|
||||
MDNode *AAMDNodes::shiftTBAA(MDNode *MD, size_t Offset) {
|
||||
// Fast path if there's no offset
|
||||
if (Offset == 0)
|
||||
return MD;
|
||||
@ -757,7 +757,7 @@ MDNode *AAMDNodes::ShiftTBAA(MDNode *MD, size_t Offset) {
|
||||
return MD;
|
||||
}
|
||||
|
||||
MDNode *AAMDNodes::ShiftTBAAStruct(MDNode *MD, size_t Offset) {
|
||||
MDNode *AAMDNodes::shiftTBAAStruct(MDNode *MD, size_t Offset) {
|
||||
// Fast path if there's no offset
|
||||
if (Offset == 0)
|
||||
return MD;
|
||||
|
Loading…
Reference in New Issue
Block a user